home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
095
/
rbbssrc2.arc
/
RBBS-PC.BAS
next >
Wrap
BASIC Source File
|
1987-03-15
|
199KB
|
5,680 lines
3 ' $linesize: 132
4 ' $title: 'RBBS CPC15-1A, Copyright 1987 by D. Thomas Mack'
5 ' WARNING !!! DO NOT CHANGE, BYPASS OR REMOVE LINES 3-31
9 'by D. Thomas Mack, 10210 Oxfordshire Road, Great Falls, VA 22066
10 ' Jon J. Martin, 4396 N. Prairie Willow Ct., Concord, CA 94521
11 ' Ken Goosens, 5020 Portsmouth Road, Fairfax, VA 22032
13 '
14 ' *******************************NOTICE*************************************
15 ' * A limited license is granted to all users of this program and it's *
16 ' * companion program, CONFIG (version 3.00), to make copies of this *
17 ' * program and distribute the copies to other users, on the following *
18 ' * conditions: *
19 ' * 1. The notices contained in lines 3 through 59 of the program *
20 ' * are not altered, bypassed, or removed. *
21 ' * 2. The program is not to be distributed to others in modified *
22 ' * form (i.e. the line numbers must remain the same). *
23 ' * 3. No fee is to be charged (or any other consideration received) *
24 ' * for copying or distributing these programs without an express *
25 ' * written agreement with D. Thomas Mack, The Second Ring, 10210 *
26 ' * Oxfordshire Road, Great falls, Virginia 22006 *
27 ' * *
28 ' * Copyright (c) 1983-1987 D. Thomas Mack, The Second Ring * 'CPC151A5
29 ' **************************************************************************
'
' $INCLUDE: 'RBBS-VAR.BAS'
'
' $SUBTITLE: 'Main-line RBBS-PC Program'
J = 54
REDIM OPT.SEC(J)
CONFIG.FILENAME$ = "RBBS-PC.DEF"
CALL GETCOMND (DEBUG)
SUBROUTINE.PARAMETER = -62
CALL READDEF
CALL MLINIT (1)
IF RECYCLE.TO.DOS OR _
DEBUG OR _
EXIT.TO.DOORS THEN _
GOTO 100
SUBROUTINE.PARAMETER = - 9
CALL CARRIER
IF SUBROUTINE.PARAMETER THEN _
CALL COPYWRIT
100 CLEAR:' Erase all variables
ON ERROR GOTO 13000:' Set ERROR trap
DEF SEG:' Point to BASIC
WIDTH 80:' Set Screen Width
SCREEN 0,0,0:' Text, No color, Pg 0
KEY OFF:' Line 25 turned off
DEFINT A-Z:' All var. integer
' ********************* Variable Definitions ********************************
102 ADIM = 99
MM = 999
BX = 50
J = 54
REDIM OPT.SEC(J)
REDIM CATEGORY.NAME$(BX),CATEGORY.CODE$(BX),CATEGORY.DESC$(BX)
REDIM A$(ADIM) ' Message line table
REDIM B$(ADIM) ' Message line table
REDIM M(MM,2) ' Message pointers
104 ACKNOWLEDGE$ = CHR$(6)
ACTIVE.MENU$ = "B"
ACTIVE.MESSAGE$=CHR$(225)
BACKSPACE$ = CHR$(8) + CHR$(32) + CHR$(8)
BACK.ARROW$ = CHR$(29) + CHR$(32) + CHR$(29)
C.L = 24
CANCEL$ = CHR$(24)
COLOR.RESET$=CHR$(27)+"[00;37;40m"
CONFIG.FILENAME$ = "RBBS-PC.DEF"
CARRIAGE.RETURN$ = CHR$(13)
DELETED.MESSAGE$=CHR$(226)
END.TRANSMISSION$ = CHR$(4)
ESCAPE$ = CHR$(27)
FALSE = 0
F1.KEY = 59
F10.KEY = 68
GRN$ = "MAIN"
LINE.FEED$ = CHR$(10)
LINE.FEEDS = NOT FALSE
LINEEDIT.CHK$ = CHR$(9)+LINE.FEED$+CHR$(11)+CHR$(12)+CHR$(127)+CHR$(8)+CHR$(7)+CHR$(26)+CHR$(227)
LINEMES$ = SPACE$(74) ' fixed length string workspace
LOCK.STATUS$ = "UM UU UB UD"
NEGATIVE.ACKNOWLEDGE$ = CHR$(21)
NO.ADVANCE = FALSE
PRESS.ENTER$ = " (Press [ENTER] to quit)"
PRIVATE.DOOR = FALSE
RIGHT.MARGIN = 72
RETURN.LINE.FEED$ = CARRIAGE.RETURN$ + LINE.FEED$
START.OF.HEADER$ = CHR$(1)
TIME.LOGGED.ON$ = SPACE$(8)
TRANSFER.OPTIONS$= _
"A)scii, X)modem, C)Xmodem/CRC, " + _
RETURN.LINE.FEED$ + _
"K)ermit, Y)modem, I)modem, G)ymodemG, W)xmodem, N)one"
TRUE = NOT FALSE
USER.DATA = FALSE
105 VERSION.ID$ = "CPC15.1A"
XOFF$ = CHR$(19)
XON$ = CHR$(17)
' ******************** Logon Error Message Table ****************************
106 LG$(1) = "Registration Check Failed"
LG$(2) = "Sysop name attempted"
LG$(3) = "Locked out attempt"
LG$(4) = "Password Attempt Failed"
LG$(5) = "Auto Lockout done"
LG$(6) = "Name in use on another Node!"
LG$(7) = "300 Baud access not allowed!"
LG$(8) = "Locked reason read!"
LG$(9) = "Expired Subscription"
CALL GETCOMND (DEBUG)
SUBROUTINE.PARAMETER = 1
CALL READDEF
ARC.WORK$ = LEFT$(CALLERS.FILE$,2) + _
"ARCWORK" + _
MID$("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ", _
VAL(NODE.ID$),1) + _
".DEF"
'
' *****************************************************************************
' * ESTABLISH NEXT CALLERS FILE RECORD AVAILABLE *
' *****************************************************************************
'
108 CALLERS.FILE.INDEX = 1
CALL FINDIT (CALLERS.FILE$)
CLOSE 2
CLOSE 4
OPEN "R",4,CALLERS.FILE$,64
FIELD 4,64 AS CALLERS.RECORD$
IF OK AND LOF(4) > 0 THEN _
CALLERS.FILE.INDEX = LOF(4) / 64
IF CALLERS.FILE.INDEX < 1 THEN _
CALLERS.FILE.INDEX = 0
X$ = STRING$(13,0)
110 GET 4,CALLERS.FILE.INDEX
IF LEFT$(CALLERS.RECORD$,13) = X$ THEN _
CALLERS.FILE.INDEX = CALLERS.FILE.INDEX-1 : _
GOTO 110
'
' *****************************************************************************
' * TEST FOR COLOR GRAPHICS MONITOR AND ANSI.SYS SUPPORT TO ALLOW THE LOCAL *
' * SYSOP TO SEE THE SAME COLOR MENUS AND SCREENS THAT THE REMOTE USER SEES *
' *****************************************************************************
'
112 IF USE.COLOR THEN _
COLOR.SUPPORT = TRUE : _
LOCAL.USER = TRUE : _
A$ = COLOR.RESET$ : _
CALL TPUT
LOCAL.USER = FALSE
UPLOAD.DRIVE.FILE$ = RIGHT$(DOWNLOAD.DRIVES$,1)+":FREESPAC.UPL"
'
' *****************************************************************************
' * TEST FOR MESSAGE FILE PRESENT (ABORT IF NOT PRESENT) *
' *****************************************************************************
'
135 ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$
ACTIVE.USER.FILE$ = MAIN.USER.FILE$
GOSUB 4910
GET 1,NODE.RECORD.INDEX
'
' *****************************************************************************
' * TEST FOR TIMED EXIT ACTIVE *
' *****************************************************************************
'
140 IF TIME.TO.DROP.TO.DOS > 0 THEN _
GOSUB 63000
'
' *****************************************************************************
' * GET CURRENT STATUS OF SYSOP AVAIL, SYSOP ANNOY, SYSOP NEXT, & PRINTER *
' *****************************************************************************
'
150 SYSOP.AVAILABLE = VAL(MID$(MESSAGE.RECORD$,32,2))
SYSOP.ANNOY = VAL(MID$(MESSAGE.RECORD$,34,2))
SYSOP.NEXT = VAL(MID$(MESSAGE.RECORD$,36,2))
PRINTER = VAL(MID$(MESSAGE.RECORD$,38,2))
IF TURN.PRINTER.OFF THEN _
PRINTER = FALSE
EXIT.TO.DOORS = VAL(MID$(MESSAGE.RECORD$,40,2))
SNOOP = VAL(MID$(MESSAGE.RECORD$,58,2))
MID$(MESSAGE.RECORD$,57,1)="I"
PUT 1,NODE.RECORD.INDEX
GOSUB 12985
'
' *****************************************************************************
' * TEST FOR MULTI LINK PRESENT IF NOT COMPAQ COMPUTER *
' *****************************************************************************
'
160 CALL MLINIT (4)
'
' *****************************************************************************
' * TEST FOR SPECIAL FILE TRANSFER PROTOCOL SUPPORT *
' *****************************************************************************
'
165 CALL PROTOCOL
'
' *****************************************************************************
' * DISPLAY RBBS-PC MAIN FUNCTION KEY DISPLAY *
' *****************************************************************************
'
170 FOR FUNCTION.KEY.INDEX = 1 TO 10
KEY FUNCTION.KEY.INDEX,""
NEXT
CALL LOADNEW (M())
'
' *****************************************************************************
' * IF RUNNING MORE THAN ONE NODE IN A DOS 3.X ENVIRONMENT (OR HIGHER) UNDER *
' * MULTILINK, THEN SET THE "SHARE.IT" INDICATOR ON SO THAT ALL FILES CAN BE *
' * ACCESSED BY ALL PARTITIONS IN A MULTI-TASKING ENVIRONMENT (I.E. MULTI- *
' * LINK). *
' *****************************************************************************
'
' IF DOS.VERSION > 2 AND _
' MAXIMUM.NUMBER.OF.NODES > 1 AND _
' MULTI.LINK.PRESENT THEN _
' SHARE.IT = TRUE
'
' *****************************************************************************
' * INITIALIZE FILE MANAGEMENT SYSTEM, CHECK FOR LOCAL BBS MODE *
' *****************************************************************************
'
175 CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
CALL CTLINES (MAX.ENTRIES)
REDIM CATEGORY.NAME$(MAX.ENTRIES),CATEGORY.CODE$(MAX.ENTRIES),_
CATEGORY.DESC$(MAX.ENTRIES)
CALL INITFMS (CATEGORY.NAME$(),CATEGORY.CODE$(), _
CATEGORY.DESC$(),NUM.CATEGORIES)
LOCAL.USER.MODE = (RIGHT$(COM.PORT$,1)<"1")
CALL BRKFNAME (CALLERS.FILE$,DRV$,X$,Y$,TRUE)
NODE.WORK.FILE$ = DRV$ + MID$(NODE.ID$,2) + ".BAT"
SECONDS.PER.SESSION! = MINUTES.PER.SESSION! * 60
IF NOT LOCAL.USER.MODE THEN _
GOTO 180
LOCAL.USER = TRUE
BPS = -6
EIGHT.BIT = TRUE
SNOOP = TRUE
RECYCLE.TO.DOS = TRUE
IF EXIT.TO.DOORS THEN _
CALL AMORPM : _
CALL READPROF : _
GOTO 410
GOTO 345
180 SUBROUTINE.PARAMETER = 2
CALL LINE25
'
' *****************************************************************************
' * WAIT FOR THE PHONE TO RING AND ANSWER IT *
' *****************************************************************************
SUBROUTINE.PARAMETER = 1
200 CALL ANSWERIT
IF EC > 1 THEN _
GOTO 13000
ON SUBROUTINE.PARAMETER GOTO 410,330,822,10595,13540,202
202 GOSUB 60010
SUBROUTINE.PARAMETER = 3
GOTO 200
330 GOSUB 21280
IF C.L <> 1 THEN _
LOCATE 22,28
PRINT "CONNECT";STR$(BAUD.TEST);" "
'
' *****************************************************************************
' * DISPLAY WELCOME LINE *
' *****************************************************************************
'
345 LOCATE 24,1
SUBROUTINE.PARAMETER = 1
CALL AMORPM
CALL FINDTIME (USER.LOGON.TIME!)
TIME.LOGGED.ON$ = TIME$
LINES.PRINTED = 0
EXPERT.USER.DEF = EXPERT.USER
EXPERT.USER = FALSE
CALL QTPUT("WELCOME TO " + RBBS.NAME$,1)
TEST.PARITY = TRUE
FILE.NAME$ = LEFT$(WELCOME.FILE$,2) + "PRELOG"
346 CALL FINDIT (FILE.NAME$)
IF OK THEN _
BYPASS.TIME.CHECK = TRUE : _
CALL BUFFILE (FILE.NAME$) : _
BYPASS.TIME.CHECK = FALSE
FF = FALSE
'
' *****************************************************************************
' * GET USER NAME *
' * C - COMMAND FROM NEWUSER REGISTER OPTIONS (CHANGE NAME OR ADDRESS) *
' *****************************************************************************
'
400 CALL SKIPLINE(1)
UPPER.CASE = FALSE
EXPERT.USER = EXPERT.USER.DEF
A1$ = "What is your "
GOSUB 12500
CALL COMMINFO
IF FF THEN _
LOGON.ERROR.INDEX = 1 : _
GOTO 10620
IF RESTRICT.BAUD = -1 AND BPS = -1 THEN _
LOGON.ERROR.INDEX = 7 : _
GOTO 10620
'
' *****************************************************************************
' * CHECK IF SAME USER ON ANOTHER NODE *
' *****************************************************************************
'
410 NODE.INDEX = 2
XX = NODES.IN.SYSTEM + 1
412 IF NODE.INDEX > XX THEN _
GOTO 430
GET 1,NODE.INDEX
IF INSTR(MESSAGE.RECORD$,ACTIVE.USER.NAME$) THEN _
GOTO 420
NODE.INDEX = NODE.INDEX + 1
GOTO 412
420 IF MID$(MESSAGE.RECORD$,57,1) = "A" THEN _
LOGON.ERROR.INDEX = 6 : _
LG$(6) = LG$(6) + LEFT$(MESSAGE.RECORD$,25) : _
GOTO 10620
FIRST.NAME$ = LEFT$(MESSAGE.RECORD$,INSTR(MESSAGE.RECORD$, " ")-1)
IF NOT PRIVATE.DOOR THEN _
CALL QTPUT(FIRST.NAME$ + ", welcome back!",1)
GOTO 430
'
' *****************************************************************************
' * TEST FOR REMOTE SYSOP LOGGING ON *
' *****************************************************************************
'
430 GET 1,NODE.RECORD.INDEX
SAME.USER = (ACTIVE.USER.NAME$ = LEFT$(MESSAGE.RECORD$,LEN(ACTIVE.USER.NAME$)))
IF FIRST.NAME$ = SYSOP.PASSWORD.1$ AND _
LAST.NAME$ = SYSOP.PASSWORD.2$ THEN _
UPPER.CASE = FALSE : _
CI$ = "REMOTE" : _
GOTO 829
'
' *****************************************************************************
' * TEST FOR SYSOP NAME ATTEMPT *
' *****************************************************************************
'
445 IF INSTR(ACTIVE.USER.NAME$,"SYSOP") OR _
INSTR(ACTIVE.USER.NAME$,SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$) THEN _
LOGON.ERROR.INDEX = 2 : _
GOTO 10620
'
' *****************************************************************************
' * REMOVE INVALID CHARACTERS FROM USER NAME *
' *****************************************************************************
'
455 CALL BADCHAR (ACTIVE.USER.NAME$)
IF ACTIVE.USER.NAME$ = "" THEN _
GOTO 400
'
' *****************************************************************************
' * CHECK FOR ACTIVE USER *
' *****************************************************************************
'
457 GOSUB 12840
GOSUB 12850
GOSUB 12598
GOSUB 11482
CALL COMPDATE (TODAY.REG.YY,TODAY.REG.MM,TODAY.REG.DD,TODAY.COMPUTE.DATE!)
IF NOT FOUND THEN _
GOTO 700
GOSUB 12984
'
' *****************************************************************************
' * ACTIVE USER FOUND *
' *****************************************************************************
'
459 GOSUB 9500
LAST.DATE.TIME.ON.SAVE$ = LAST.DATE.TIME.ON$
IF EXIT.TO.DOORS THEN _
USER.LOGON.TIME! = (VAL(MID$(LAST.DATE.TIME.ON$,10,2))*3600) + _
(VAL(MID$(LAST.DATE.TIME.ON$,13,2))*60) : _
CALL TIMEREMAIN (TIME.REMAINING!)
USER.FILE.INDEX = LOC(5)
GOSUB 5135
GOSUB 5170
IF REG.DAYS.REMAINING < 0 THEN _
CALL QTPUT (LG$(9)+" - security reset to "+STR$(EXPIRED.SECURITY),1):_
LOGON.ERROR.INDEX = 9 : _
USER.SECURITY.LEVEL = EXPIRED.SECURITY : _
LSET SECURITY.LEVEL$ = STR$(USER.SECURITY.LEVEL)
GOSUB 5135
USER.SECURITY.LEVEL$ = STR$(USER.SECURITY.LEVEL)
IF USER.SECURITY.LEVEL > -1 THEN _
USER.SECURITY.LEVEL$ = MID$(USER.SECURITY.LEVEL$,2)
FILE.NAME$ = "LG" + USER.SECURITY.LEVEL$ + ".DEF"
BYPASS.TIME.CHECK = TRUE
CALL OPENWORK (FILE.NAME$)
IF EC = 0 THEN _
GOSUB 6000
BYPASS.TIME.CHECK = FALSE
460 IF USER.SECURITY.LEVEL >= MINIMUM.LOGON.SECURITY THEN _
GOTO 470
IF LOGON.ERROR.INDEX <> 9 THEN _
LOGON.ERROR.INDEX = 8
GOTO 10620
470 GOSUB 12989
CI$ = CITY.STATE$
ATTEMPTS.ALLOWED = 4
PASSWORD.SAVE$ = PASSWORD$
TEMP.SYSOP = (USER.SECURITY.LEVEL >= SYSOP.SECURITY.LEVEL)
MESSAGE.PASSWORD = FALSE
IF CURRENT.DATE$ <> LEFT$(LAST.DATE.TIME.ON$,8) THEN _
ELAPSED.TIME = 0 _
ELSE ELAPSED.TIME = CVI(ELAPSED.TIME$)
IF PASSWORD.SAVE$ = SPACE$(LEN(PASSWORD.SAVE$)) THEN _
GOSUB 755 : _
GOTO 800
480 IF PRIVATE.DOOR THEN _
Z$ = PASSWORD.SAVE$ : _
PASSWORD.FAILED = 0 : _
GOTO 644
IF Q = 3 THEN _
Z$ = B$(3) : _
ATTEMPTS = 1 : _
GOSUB 677 _
ELSE GOSUB 675
630 IF PASSWORD.FAILED THEN _
LOGON.ERROR.INDEX = 4 : _
GOTO 10620
643 GOSUB 41070
644 NEW.USER = FALSE
WK$ = RIGHT$(STR$(ASC(MID$(LIST.NEW.DATE$,2))),2) + _ ' MM
"/" + _
RIGHT$(STR$(ASC(MID$(LIST.NEW.DATE$,3))),2) + _ ' DD
"/" + _
RIGHT$(STR$(ASC(LIST.NEW.DATE$)),2) ' YY
LM$ = RIGHT$(WK$,2) + _ ' YY
LEFT$(WK$,2) + _ ' MM
MID$(WK$,4,2) ' DD
IF MID$(LM$,3,1) = " " THEN _
MID$(LM$,3,1) = "0"
655 IF MID$(LM$,5,1) = " " THEN _
MID$(LM$,5,1) = "0"
660 CALL MUSIC (1)
GOTO 800
'
' *****************************************************************************
' * USER & MESSAGE PASSWORD VALIDATION *
' *****************************************************************************
'
665 SUBROUTINE.PARAMETER = 1
GOTO 678
667 SUBROUTINE.PARAMETER = 2
GOTO 678
670 SUBROUTINE.PARAMETER = 3
GOTO 678
675 SUBROUTINE.PARAMETER = 4
GOTO 678
677 SUBROUTINE.PARAMETER = 5
678 CALL PASSWORD
RETURN
'
' *****************************************************************************
' * ACTIVE USER NOT FOUND (NEWUSER ROUTINE) *
' *****************************************************************************
'
700 EXPERT.USER = FALSE
IF RESTRICT.BAUD = -2 AND BPS = -1 THEN _
LOGON.ERROR.INDEX = 7 : _
A$ = "(300 BAUD ACCESS FOR REGISTERED USERS ONLY) " : _
GOSUB 12976 : _
GOTO 10620
Z$ = FIRST.NAME$
GOSUB 12570
IF FOUND THEN _
GOSUB 12984 : _
GOTO 12595
Z$ = LAST.NAME$
GOSUB 12570
IF FOUND THEN _
GOSUB 12984 : _
GOTO 12595
710 IF USER.FILE.INDEX = 0 AND NOT SURVIVE.NOUSER.ROOM THEN _
GOTO 13540
720 USER.SECURITY.LEVEL = DEFAULT.SECURITY.LEVEL
725 IF USER.SECURITY.LEVEL < MINIMUM.LOGON.SECURITY OR _
FIRST.NAME$ = LAST.NAME$ THEN _
LOGON.ERROR.INDEX = 3 : _
GOTO 10620
IF NOT REMEMBER.NEW.USERS THEN _
GOSUB 13700 : _
USER.FILE.INDEX = 0 : _
GOSUB 12960: _
PREV.LAST.ON$ = "00/00/00": _
GOTO 735
NEW.USER = TRUE
CALL OPENUSER
GOSUB 9450
GOSUB 12630
MID$(USER.RECORD$,START.HASH,LEN.HASH) = LEFT$("NEWUSER",LEN.HASH)
IF START.INDIV>0 THEN _
MID$(USER.RECORD$,START.INDIV,LEN.INDIV) = INDIV.VALUE$
PUT 5,USER.FILE.INDEX
730 GOSUB 12960
735 BYPASS.TIME.CHECK = TRUE
LINES.PRINTED = 0
FILE.NAME$ = NEWUSER.FILE$
STOP.INTERRUPTS = FALSE
GOSUB 1790
STOP.INTERRUPTS = TRUE
BYPASS.TIME.CHECK = FALSE
739 CALL QTPUT(ACTIVE.USER.NAME$ + " from " + CI$,1)
740 A$ = "<C>hange name/address, <D>isconnect, <R>egister"
GOSUB 12995
CALL ALLCAPSD (B$(),1)
Z$ = B$(1)
S = INSTR("CDR",Z$)
745 IF NOT REMEMBER.NEW.USERS THEN _
ON S GOTO 748,752,754
ON S GOTO 747,750,760
GOTO 740
747 CALL UPDTCALR (ACTIVE.USER.NAME$ + " from " + CI$ +_
" changed Name/Address",2)
MID$(USER.RECORD$,START.HASH,LEN.HASH) = STRING$(LEN.HASH,0)
PUT 5,USER.FILE.INDEX
GOSUB 12991
748 FF = FALSE
GOTO 400
'
' *****************************************************************************
' * D - COMMAND FROM NEWUSER ROUTINE (DISCONNECT - REFUSE TO REGISTER) *
' *****************************************************************************
'
750 CALL UPDTCALR (ACTIVE.USER.NAME$ + " from " + CI$ + _
" didn't register",2)
MID$(USER.RECORD$,START.HASH,LEN.HASH) = STRING$(LEN.HASH,0)
PUT 5,USER.FILE.INDEX
GOSUB 12991
752 FF = FALSE
USER.FILE.INDEX = 0
GOTO 13540
'
' *****************************************************************************
' * GET AND VERIFY PASSWORD *
' *****************************************************************************
'
754 CALL QTPUT ("GUEST privileges granted. RE-REGISTER on future calls",1)
GOTO 832
755 IF PRIVATE.DOOR THEN _
B$(1) = PASSWORD$ : _
Z$ = B$(1) : _
GOSUB 1275 : _
RETURN
GOSUB 12800
A$ = "Re-enter PASSWORD for verification (Dots Echo)"
GOSUB 45010
SWAP Z$,B$(1)
CALL ALLCAPS (Z$)
IF B$(1) <> Z$ THEN _
CALL QTPUT ("Passwords Don't match!",1) : _
GOTO 755
RETURN
'
' *****************************************************************************
' * R - COMMAND FROM NEWUSER ROUTINE - REGISTER *
' *****************************************************************************
'
760 GOSUB 755
CALL ALLCAPS (Z$)
LSET PASSWORD$ = Z$
CALL QTPUT("Please REMEMBER your password",1)
TEMP.SECURITY.LEVEL = USER.SECURITY.LEVEL
IF NEWUSER.SETS.DEFAULTS THEN _
GOSUB 42950 : _
BYPASS.TIME.CHECK = TRUE : _
GOSUB 43000 : _
BYPASS.TIME.CHECK = FALSE : _
GOSUB 43030 : _
GOSUB 42800 : _
GOSUB 42700 _
ELSE UPPER.CASE = FALSE : _
GR = 0 : _
USER.GRAPHIC.DEFAULT$ = " " : _
NULLS = FALSE : _
USER.TRANSFER.DEFAULT$ = " "
GOSUB 12900
CALL DEFAULTU
QUESTIONNAIRE$ = "RBBS-REG.DEF"
GOSUB 11510
LSET SECURITY.LEVEL$ = MKI$(USER.SECURITY.LEVEL)
'
' *****************************************************************************
' * LOGIN ALL USERS *
' *****************************************************************************
'
800 MAIN.USER.FILE.INDEX = USER.FILE.INDEX
USER.SECURITY.SAVE = USER.SECURITY.LEVEL
TIMES.LOGGED.ON = CVI(MID$(USER.OPTIONS$,1,2)) + 1
LINES.PRINTED = 0
GOSUB 9500
PREV.LAST.ON$ = LAST.DATE.TIME.ON$
IF PRIVATE.DOOR THEN _
GOTO 815
IF (EIGHT.BIT AND _
AUTODOWNLOAD.AVAILABLE) OR _
ASK.IDENTITY THEN _
CALL TESTUSER
CALL QTPUT ("Logging " + ACTIVE.USER.NAME$,1)
CALL QTPUT ("RBBS-PC " + VERSION.ID$ + " NODE " + NODE.ID$,1)
CALL QTPUT (" OPERATING AT " + BAUD.PARITY$,1)
ATTEMPTS = 0
805 IF EIGHT.BIT AND AUTODOWNLOAD.AVAILABLE THEN _
A$ = CHR$(7) + CHR$(9) + RETURN.LINE.FEED$ + _
CHR$(7) + "You may use " + _
CHR$(7) + "AUTODOWNLOADing!" + _
CHR$(7) + RETURN.LINE.FEED$ + CHR$(7) : _
GOSUB 12979 : _
CALL DELAYIT(4)
815 DOWNLOADS = CVI(USER.DOWNLOADS$)
UPLOADS = CVI(USER.UPLOADS$)
LAST.MESSAGE.READ = -LAST.MESSAGE.READ*(LAST.MESSAGE.READ <= HIGH.MESSAGE.NUMBER)
LSET USER.OPTIONS$ = MKI$(TIMES.LOGGED.ON) + _
MID$(USER.OPTIONS$,3)
LSET LAST.DATE.TIME.ON$ = CURRENT.DATE$ + " " + TIME.LOGGED.ON$
MID$(USER.RECORD$,START.HASH,LEN.HASH) = HASH.VALUE$
IF START.INDIV>0 THEN _
MID$(USER.RECORD$,START.INDIV,LEN.INDIV) = INDIV.VALUE$
LSET USER.NAME$ = ACTIVE.USER.NAME$
PUT 5,USER.FILE.INDEX
GOSUB 12991
IF PRIVATE.DOOR THEN _
GOTO 821
IF NOT SAME.USER THEN _
STOP.INTERRUPTS = WELCOME.INTERRUPTABLE : _
BYPASS.TIME.CHECK = TRUE : _
FILE.NAME$ = WELCOME.FILE$ : _
GOSUB 1790
BYPASS.TIME.CHECK = FALSE : _
STOP.INTERRUPTS = FALSE
816 IF NOT NEW.USER THEN _
CALL QTPUT("Times on:" + STR$(TIMES.LOGGED.ON) + _
" Last time on was: " + PREV.LAST.ON$,1)
817 IF REMIND.FILE.TRANSFERS THEN _
A$ = "Files Downloaded:" + _
STR$(DOWNLOADS) + _
" Uploaded:" + _
STR$(UPLOADS) : _
GOSUB 12977
820 LINES.PRINTED = 0
IF REMIND.PROFILE THEN _
GOSUB 5400
LINES.PRINTED = 0
821 CI$ = LEFT$(CI$ + SPACE$(2),INSTR(CI$ +SPACE$(2),SPACE$(2))-1)
GOTO 832
'
' *****************************************************************************
' * ESC PRESSED ON LOCAL CONSOLE ENTERS HERE *
' *****************************************************************************
'
822 LOCATE 24,1
CALL FINDTIME (USER.LOGON.TIME!)
GOSUB 14500
LOCAL.USER = TRUE
WAIT.BEFORE.DISCONNECT = 32400
BPS = -6
CALL MUSIC (2)
IF LOCAL.PASSWORD$ = "NONE" THEN _
GOTO 828
A$ = "Enter PASSWORD (dots echo) "
PRINT A$;
Z$ = ""
INKEYS.PRESSED = 0
823 A$ = INKEY$
IF A$ = "" THEN _
GOTO 823
IF A$ = CARRIAGE.RETURN$ THEN _
GOTO 824
IF (A$ = CHR$(8)) AND (INKEYS.PRESSED > 0) THEN _
PRINT BACK.ARROW$; : _
INKEYS.PRESSED = INKEYS.PRESSED - 1 : _
IF LEN(Z$) > 1 THEN _
Z$ = LEFT$(Z$,LEN(Z$)-1) : _
GOTO 823 _
ELSE Z$ = "" : _
GOTO 823
IF ASC(A$) > 127 OR _
ASC(A$) < 32 THEN _
GOTO 823
Z$= Z$ + A$
PRINT ".";
INKEYS.PRESSED = INKEYS.PRESSED + 1
GOTO 823
824 PRINT A$;
CALL ALLCAPS (Z$)
IF Z$ <> LOCAL.PASSWORD$ THEN _
GOTO 13549
828 EIGHT.BIT = TRUE
GR = 1
CI$ = "LOCAL"
LINE.FEEDS = TRUE
RETURN.LINE.FEED$ = LINE.FEED$
USER.SECURITY.LEVEL = SYSOP.SECURITY.LEVEL
829 FIRST.NAME$ = SYSOP.FIRST.NAME$
LAST.NAME$ = SYSOP.LAST.NAME$
ACTIVE.USER.NAME$ = "SYSOP"
USER.SECURITY.LEVEL = SYSOP.SECURITY.LEVEL
GOSUB 5135
SYSOP = TRUE
REQ.QUES.ANSWERED = TRUE
REG.DAYS.REMAINING = 365
GOSUB 11482
CALL COMPDATE (TODAY.REG.YY,TODAY.REG.MM,TODAY.REG.DD,TODAY.COMPUTE.DATE!)
X$ = DATE$
PREV.LAST.ON$ = LEFT$(X$,6) + RIGHT$(X$,2)
SUBROUTINE.PARAMETER = 1
CALL AMORPM
IF LOCAL.USER THEN _
SNOOP = TRUE : _
SYSOP.NEXT = TRUE : _
GOSUB 33090
LINES.PRINTED = 0
832 IF REG.DAYS.REMAINING <= DAYS.TO.WARN AND _
RESTRICT.BY.DATE AND REG.DAYS.REMAINING > 0 THEN _
CALL QTPUT ("Subscription EXPIRES in"+STR$(REG.DAYS.REMAINING)+" days!",1) : _
CALL DELAYIT (5)
IF (NOT REQ.QUES.ANSWERED) AND _
REQUIRED.QUESTIONNAIRE$ <> "" THEN _
QUESTIONNAIRE$ = REQUIRED.QUESTIONNAIRE$: _
GOSUB 11510: _
IF OK THEN _
REQ.QUES.ANSWERED = TRUE
836 IF LOCAL.USER THEN _
SNOOP = TRUE : _
LINE.FEEDS = TRUE : _
CI$ = "LOCAL" : _
A = INSTR(TRANSFER.OPTIONS$,CARRIAGE.RETURN$) : _
IF A>0 THEN _
MID$(TRANSFER.OPTIONS$,A,1) = " "
837 Z$ = ACTIVE.USER.NAME$ + _
" on at " + _
CURRENT.DATE$ + _
", " + _
TIM$ + _
" from " + _
CI$ + _
", " + _
BAUD.PARITY$
NG$ = Z$ + SPACE$(128-LEN(Z$))
GOSUB 12860
CALL PRINTIT (" " + Z$)
IF NEW.USER THEN _
CALL UPDTCALR ("NEWUSER",1) : _
CALL MUSIC (2) : _
NEW.USER = FALSE
842 SECONDS.PER.SESSION! = (MINUTES.PER.SESSION! + LIMIT.DAILY.TIME * ELAPSED.TIME) * 60
GOSUB 4910
CALLS.TODATE! = CALLS.TODATE! + 1 + SYSOP
GOSUB 24000
GET 1,NODE.RECORD.INDEX
MID$(MESSAGE.RECORD$,1,31) = ACTIVE.USER.NAME$ + SPACE$(31-LEN(ACTIVE.USER.NAME$))
MID$(MESSAGE.RECORD$,40,2) = " 0"
MID$(MESSAGE.RECORD$,55,2) = " 0"
MID$(MESSAGE.RECORD$,57,1) = "A"
MID$(MESSAGE.RECORD$,60,4) = BAUD.PARITY$
MID$(MESSAGE.RECORD$,72,2) = STR$(FALSE)
PUT 1,NODE.RECORD.INDEX
GOSUB 12985
SYSOP = (USER.SECURITY.LEVEL >= SYSOP.SECURITY.LEVEL)
SUBROUTINE.PARAMETER = 2
850 CALL LINE25
CALL SKIPLINE (1)
IF PRIVATE.DOOR OR EXIT.TO.DOORS THEN _
GOTO 900
IF M(1,1) < 1 THEN _
LAST.NEW = 0 _
ELSE CALL CTNEWFILES (PREV.LAST.ON$,M(),LAST.NEW)
IF LAST.NEW > 22 THEN _
A$ = "At least"_
ELSE A$ = ""
IF FMS.DIRECTORY$ <> "" THEN _
CALL QTPUT(A$ + STR$(LAST.NEW) + " NEW file(s) since last on",1) _
ELSE GOTO 852
IF NOT NEW.FILES.CHECK OR LAST.NEW < 1 THEN _
GOTO 852
L = LEN(DOWNLOAD.DRIVES$)
IF (NOT SKIP.FILES.LOGON) AND _
(USER.SECURITY.LEVEL >= MIN.SEC.TO.VIEW) AND _
USER.SECURITY.LEVEL >= OPT.SEC(18) THEN _
A$ = "Review new files to download ([Y],N)" :_
GOSUB 12995 :_
IF NOT NO THEN _
Q = 3:_
B$(2) = MID$(PREV.LAST.ON$,1,2) + MID$(PREV.LAST.ON$,4,2) +_
MID$(PREV.LAST.ON$,7,2):_ ' @ FORMAT
Y$ = B$(3) : _
CALL BRKFNAME (FMS.DIRECTORY$,DR$,Y$,X$,FALSE): _
B$(3) = Y$ : _
GOSUB 53000
852 IF LOCAL.USER AND SYSOP THEN _
GOTO 900
IF USER.SECURITY.LEVEL < OPT.SEC (2) OR ACTIVE.BULLETINS < 1 THEN _
GOTO 900
855 IF NOT BULLETINS.OPTIONAL THEN _
GOTO 860
IF NOT CHECK.BULLETIN.LOGON THEN _
ANS.INDEX = 0 : _
GOSUB 9760 : _
GOTO 900
CALL SKIPLINE (1)
A$ = "Skip the" + STR$(ACTIVE.BULLETINS) + " bulletins"
GOSUB 12995
IF YES THEN _
GOTO 900
860 GOSUB 9705
900 GOSUB 1900
SUBROUTINE.PARAMETER = 2
CALL LINE25
CALL CALLOPT
SECTION$ = " "
IF PRIVATE.DOOR THEN _
GOSUB 20266 : _
GOSUB 1275 : _
GOTO 1205
955 GOSUB 4850
'
' *****************************************************************************
' * *
' * COMMAND PROCESSING *
' * *
' *****************************************************************************
'
1200 CLOSE 1
GOSUB 1280
1205 CHAT.AVAILABLE = TRUE
SUBROUTINE.PARAMETER = 1
STOP.INTERRUPTS = TRUE
NON.STOP = FALSE
Q = 0
GOSUB 12979
1210 GOSUB 41000
CALL DISPLAYTR (TIME.REMAINING!)
IF EXPERT.USER THEN _
GOTO 1230
LINES.PRINTED = 0
IF SUB.SECTION < BEG.FILE THEN _
IF SYSOP THEN _
FILE.NAME$ = MENU$(1) : _
GOSUB 43025
FILE.NAME$ = MENU$(MENU.INDEX)
GOSUB 43025
1230 CALL LINE25
CALL SKIPLINE (1)
IF CONFERENCE.MODE THEN _
A$ = GRN$ : _
GOSUB 12979
A$ = COMMAND.PROMPT$
GOSUB 12995
IF Q = 0 THEN _
GOTO 1230
1235 Z$ = B$(1)
IF LEN(Z$) < 1 THEN _
GOTO 1230
CALL ALLCAPS (Z$)
CALL SRCHCMND (SUB.SECTION,FF)
IF FF < 1 THEN _
GOSUB 1305 : _
GOTO 1230
IF ASC(Z$) = 32 THEN _
GOTO 1230
IF USER.SECURITY.LEVEL < OPT.SEC(FF) THEN _
VIOLATION$ = SECTION$+" "+Z$ : _
GOSUB 1380 : _
GOTO 1205
ON FF GOSUB _
1400, _ ' A)nswer questionnaire 1
9700, _ ' B)ulletins
1800, _ ' C)omments
10970, _ ' D)oor (exit to)
2000, _ ' E)nter a message
1275, _ ' F)ile system (exit to)
1760, _ ' I)nitial welcome redisplayed
5300, _ ' J)oin a conference
3900, _ ' K)ill a message
4700, _ ' O)perator page
1900, _ ' P)ersonal mail (look for)
4330, _ ' R)ead messages
4340, _ ' S)can message headers
4320, _ ' T)opic msg scan
1285, _ ' U)tilities (exit to)
5800, _ ' V)iew a conference
9800, _ ' W)ho's on other nodes displayed 17
20180, _ ' D)ownload 1
10570, _ ' G)oodbye
20150, _ ' L)ist
53000, _ ' N)ew
52900, _ ' S)can
20400, _ ' U)pload 6
20140, _ ' V)iew ARC Contents
5500, _ ' B)aud rate change 300==>450 1
9100, _ ' C)lock (time & time on)
42800, _ ' F)ile transfer protocol
43000, _ ' G)raphics
5200, _ ' L)ines per page
10925, _ ' M)essage margin
5110, _ ' P)assword change
5400, _ ' R)eview preferences
4850, _ ' S)tatistics displayed
1500, _ ' T)oggle
10090, _ ' U)serlog displayed 11
1325, _ ' H)elp 1
1325, _ ' ?)help
1250, _ ' Q)uit
4240, _ ' X)expert toggle on/off 4
10070, _ ' 1) List comments file 1
10090, _ ' 2) List callers file
10390, _ ' 3) Recover a message
10530, _ ' 4) Erase comments
11000, _ ' 5) User file maintenance
33070, _ ' 6) Toggle page bell on/off
10930 ' 7) Exit to DOS 2.x or above 7
GOTO 1205
' ************************************************************
' * QUIT COMMAND (GLOBAL) *
' ************************************************************
1250 IF Q>1 THEN _
ANS.INDEX = 2: _
GOTO 1270
1260 ANS.INDEX = 1
IF EXPERT.USER THEN _
A$ = "QUIT to F,[M],U,S"_
ELSE _
A$ = "QUIT to F)ile, [M]ain, U)til section or S)ystem (hang up) ([ENTER]=M)"
GOSUB 12995
IF Q = 0 THEN _
Q = 1: _
B$(1) = "M"
1270 Z$ = B$(ANS.INDEX)
CALL ALLCAPS (Z$)
ON INSTR("FMUS",Z$) GOTO 1275,1280,1285,10570
GOTO 1260
1275 LSET SECTION$ = "FILE"
SECTION.OPTS$ = FILE.OPTS$
SUB.SECTION = BEG.FILE
MENU.INDEX = 3
GOTO 1295
1280 LSET SECTION$ = "MAIN"
SECTION.OPTS$ = MAIN.OPTS$
SUB.SECTION = BEG.MAIN
MENU.INDEX = 2
GOTO 1295
1285 LSET SECTION$ = "UTIL"
SECTION.OPTS$ = UTIL.OPTS$
SUB.SECTION = BEG.UTIL
MENU.INDEX = 4
GOTO 1295
1295 ACTIVE.MENU$ = LEFT$(SECTION$,1)
IF SHOW.SECTION THEN _
SECTION.PROMPT$ = SECTION$ _
ELSE SECTION.PROMPT$ = "Your"
IF COMMANDS.IN.PROMPT=0 THEN _
SECTION.OPTS$ = ""
COMMAND.PROMPT$ = SECTION.PROMPT$ + " command" + SECTION.OPTS$
RETURN
1300 CALL QTPUT ("Message base " + GRN$,1)
RETURN
1305 CALL QTPUT(PRESENT.OPTS$,1)
CALL QTPUT(CALLERS.OPTS$,1)
RETURN
' ****************************************************************
' * HELP (GLOBAL) *
' ****************************************************************
1325 CALL HELP (SUB.SECTION,USER.GRAPHIC.DEFAULT$,_
MID$("MAINFILEUTIL",(MENU.INDEX-2)*4+1,4))
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN 10595
RETURN
'
' *****************************************************************************
' * RECORD SECURITY VIOLATIONS *
' *****************************************************************************
'
1380 A$ = "SYSOP must authorize"
GOSUB 1397
CALL UPDTCALR ("SV!-"+VIOLATION$,2)
CALL MUSIC (3)
VIOLATIONS.THIS.SESSION = VIOLATIONS.THIS.SESSION + 1
IF MAXIMUM.VIOLATIONS = 0 OR VIOLATIONS.THIS.SESSION <= MAXIMUM.VIOLATIONS THEN _
RETURN
1385 IF USER.FILE.INDEX < 1 THEN _
RETURN
A$ = "SECURITY VIOLATION! Sysop can reinstate"
IF USER.SECURITY.LEVEL <= MINIMUM.LOGON.SECURITY THEN _
A$ = "" : _
USER.SECURITY.LEVEL = USER.SECURITY.LEVEL-1 _
ELSE USER.SECURITY.LEVEL = MINIMUM.LOGON.SECURITY
1386 GOSUB 12979
LOGON.ERROR.INDEX = 5
GOSUB 12989
CALL OPENUSER
GOSUB 9450
GET 5,USER.FILE.INDEX
LSET SECURITY.LEVEL$ = MKI$(USER.SECURITY.LEVEL)
PUT 5,USER.FILE.INDEX
GOTO 10620
1397 A$ = "Sorry, " + FIRST.NAME$ + ", " + A$
GOTO 12976
'
' *****************************************************************************
' * END KEY - FORCE CURRENT USER OFF AND LOCK THEM OUT *
' *****************************************************************************
'
1398 CALL CARRIER
IF SUBROUTINE.PARAMETER THEN _
RETURN
FUNCTION.KEY = 0
IF INSTR("MUF",ACTIVE.MENU$)>0 THEN_
GOTO 1399
CURSOR.LINE = CSRLIN
CURSOR.ROW = POS(0)
LOCATE 25,1
PRINT SPACE$(79);
LOCATE 25,1
PRINT "Cannot FORCE OFF until user reaches MAIN menu";
CALL DELAYIT (1)
LOCATE CURSOR.LINE,CURSOR.ROW
SUBROUTINE.PARAMETER = 1
CALL LINE25
RETURN
1399 A$ = FIRST.NAME$ + ", goodbye and don't call back"
GOSUB 12975
IF USER.FILE.INDEX < 1 THEN _
GOTO 10698
USER.SECURITY.LEVEL = MINIMUM.LOGON.SECURITY - 1
GOTO 1386
'
' *****************************************************************************
' * ANSWER - COMMAND FROM MAIN MENU (ANSWER QUESTIONNAIRE) *
' *****************************************************************************
'
1400 IF Q > 1 THEN _
ANS.INDEX = 2:_
GOTO 1407
1402 CALL BUFFILE (ANS.MENU$)
IF NOT OK THEN _
CALL QTPUT("No questionnaires available",1):_
RETURN
1405 A$ = "Answer which questionnaire"
GOSUB 12998
IF Q = 0 THEN _
RETURN
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN 10595
ANS.INDEX = 1
1407 Z$ = B$(ANS.INDEX)
CALL WORDINFILE (ANS.MENU$,Z$,FOUND)
IF NOT FOUND THEN _
CALL QTPUT ("No such questionnaire "+Z$,1):_
GOTO 1402
QUESTIONNAIRE.HOLD$ = Z$
QUESTIONNAIRE$ = Z$+".DEF"
GOSUB 11510
1415 IF NOT OK THEN _
CALL UPDTCALR ("Missing questionnaire " + Z$,2) : _
GOTO 1402
1424 CLOSE 2
CALL UPDTCALR (QUESTIONNAIRE.HOLD$ + " Questionnaire answered",2)
RETURN
'
' *****************************************************************************
' * TOGGLE COMMAND (UTILITIES) *
' *****************************************************************************
'
1500 IF Q>1 THEN _
ANS.INDEX = 2 : _
LAST.INDEX = Q : _
GOTO 1510
1502 ANS.INDEX = 1
CALL QTPUT("TOGGLE which options on/off?"+PRESS.ENTER$,1)
A$ = "A)utodownload,B)ulletin,C)ase,F)ile,L)ine feeds,N)ulls,X)expert,!)bell"
GOSUB 12995
IF Q=0 THEN _
RETURN
LAST.INDEX = Q
1510 Z$ = B$(ANS.INDEX)
CALL ALLCAPS (Z$)
FF = INSTR("ABCFLNX!",Z$)
IF FF<1 THEN _
GOTO 1502
ON FF GOSUB _
1550, _ 'Autodownload
4120, _ 'Bulletin review on logon
42960, _ 'Case change
4140, _ 'File review on logon
4100, _ 'Line feeds
42710, _ 'Nulls
4240, _ 'Expert
4200 'Bell
ANS.INDEX = ANS.INDEX + 1
IF ANS.INDEX > LAST.INDEX THEN _
GOTO 1502
GOTO 1510
1550 IF NOT AUTODOWNLOAD.AVAILABLE THEN _
CALL TESTUSER : _
IF COM.PROGRAM = 0 OR COM.PROGRAM > 3 THEN _
GOTO 1560
AUTODOWNLOAD.AVAILABLE = NOT AUTODOWNLOAD.AVAILABLE
1560 A$ = "Autodownload "+MID$("offon",1-3*AUTODOWNLOAD.AVAILABLE,3)
GOSUB 12979
RETURN
'
' *****************************************************************************
' * I - COMMAND FROM MAIN MENU (DISPLAY INITIAL WELCOME) *
' *****************************************************************************
'
1760 FILE.NAME$ = WELCOME.FILE$
1765 GOSUB 1790
RETURN
1790 GOSUB 43030
CALL BUFFILE (FILE.NAME$)
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN 10595
RETURN
'
' *****************************************************************************
' * C - COMMAND FROM MAIN MENU (LEAVE COMMENT FOR SYSOP) *
' *****************************************************************************
'
1800 A$ = "Leave a comment for " + _
SYSOP.FIRST.NAME$ + _
" (Y/N)"
CALL SKIPLINE (1)
GOSUB 12995
RIGHT.MARGIN = 72
IF NOT YES THEN _
GOSUB 12979 : _
RETURN
1840 IF CONFERENCE.MODE AND _
COMMENTS.AS.MESSAGES THEN _
CALL QTPUT ("Comments can't be left in a Conference",1) : _
RETURN
IF CONFERENCE.MODE THEN _
COMMENTS.IN.CONFERENCE = 1 : _
IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
GOSUB 5350 _
ELSE GOSUB 5360
MESSAGE.TO$ = "SYSOP"
SUBJECT$ = "COMMENT"
IF (ACTIVE.MESSAGES > = MAXIMUM.MESSAGES OR _
NEXT.MESSAGE.RECORD + 5 > HIGHEST.MESSAGE.RECORD OR _
NOT COMMENTS.AS.MESSAGES ) THEN _
A$ = SYSOP.FIRST.NAME$ + " UNABLE to reply. Leave a comment? (Y/N)" : _
GOSUB 12995 : _
IF NOT YES THEN _
GOSUB 12979 : _
RETURN : _
ELSE SYSOP.COMMENT = TRUE : _
GOTO 2007
SYSOP.COMMENT = FALSE
SYSOP.MESSAGE = TRUE
FT$ = "comment"
GOTO 2010
1850 CLOSE 2
BX = &H3
EN$ = COMMENTS.FILE$
GOSUB 12992
IF SHARE.IT THEN _
OPEN COMMENTS.FILE$ FOR APPEND SHARED AS #2 _
ELSE OPEN "A",2,COMMENTS.FILE$ ' FORMAT
A$ = FIRST.NAME$ + ", Thanks for comments!"
GOSUB 12976
SUBROUTINE.PARAMETER = 2
CALL AMORPM
PRINT #2,ACTIVE.USER.NAME$,CURRENT.DATE$,TIM$,"Node ";NODE.ID$
FOR X = 1 TO LINES.IN.MESSAGE
PRINT #2,A$(X)
NEXT
PRINT #2,CARRIAGE.RETURN$
CLOSE 2
BX = &H3
EN$ = COMMENTS.FILE$
GOSUB 12993
CALL UPDTCALR ("Left comment",1)
REDIM A$(ADIM)
RETURN
'
' *****************************************************************************
' * P - COMMAND FROM MAIN MENU (DISPLAY PERSONAL MAIL) *
' *****************************************************************************
'
1900 CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
SHOW.ACTIVE = FALSE
IF NOT PRIVATE.DOOR THEN _
A$ = "Checking messages in "+GRN$ : _
GOSUB 12978 : _
SHOW.ACTIVE = TRUE
MESSAGES.FROM.USER = FALSE
ACTIVE.MESSAGES = 0
GOSUB 23000
MESSAGE.RECORD = FIRST.MESSAGE.RECORD
ACTIVE.DELAY! = 0
MAXIMUM.MESSAGES = VAL(MID$(MESSAGE.RECORD$,89,7))
IF MAXIMUM.MESSAGES > MM THEN _
MAXIMUM.MESSAGES = MM
REDIM M(MAXIMUM.MESSAGES,2)
1905 GET 1,MESSAGE.RECORD
NUMBER.RECORDS.IN.MESSAGE = VAL(MID$(MESSAGE.RECORD$,117,4))
IF NUMBER.RECORDS.IN.MESSAGE < 1 THEN _
NUMBER.RECORDS.IN.MESSAGE = 1
1906 CALL FINDTIME (TI!)
IF SHOW.ACTIVE AND TI! > ACTIVE.DELAY! THEN _
A$ = "." : _
GOSUB 12978 : _
CALL FINDTIME (TI!) : _
ACTIVE.DELAY! = TI! + 1
1910 IF MESSAGE.RECORD >= NEXT.MESSAGE.RECORD THEN _
LOW.MESSAGE.NUMBER = M(1,2) : _
GOTO 1950
1915 IF MID$(MESSAGE.RECORD$,116,1) = DELETED.MESSAGE$ OR _
MID$(MESSAGE.RECORD$,116,1) <> ACTIVE.MESSAGE$ THEN _
GOTO 1946
1920 IF INSTR(MID$(MESSAGE.RECORD$,37,31),ACTIVE.USER.NAME$) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,37,31),"SYSOP")) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,37,31),SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$)) THEN _
GOTO 1925
GOTO 1935
1925 IF SHOW.ACTIVE THEN _
CALL SKIPLINE (1) : _
CALL QTPUT("Mail for YOU (* = Private)",1) : _
SHOW.ACTIVE = FALSE
1930 A$ = LEFT$(MESSAGE.RECORD$,5)
GOSUB 12978
1935 IF INSTR(MID$(MESSAGE.RECORD$,6,31),ACTIVE.USER.NAME$) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,6,31),"SYSOP")) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,6,31),SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$)) THEN _
GOTO 1940
GOTO 1945
1940 IF MESSAGES.FROM.USER < ADIM THEN _
MESSAGES.FROM.USER = MESSAGES.FROM.USER + 1 : _
B$(MESSAGES.FROM.USER) = LEFT$(MESSAGE.RECORD$,5)
1945 ACTIVE.MESSAGES = ACTIVE.MESSAGES + 1
M(ACTIVE.MESSAGES,1) = MESSAGE.RECORD
M(ACTIVE.MESSAGES,2) = VAL(MID$(MESSAGE.RECORD$,2,4))
1946 MESSAGE.RECORD = MESSAGE.RECORD + NUMBER.RECORDS.IN.MESSAGE
GOTO 1905
1950 IF SHOW.ACTIVE THEN _
A$ = "Sorry, " + FIRST.NAME$ + ", NO MAIL for you" :_
GOSUB 12975
IF MESSAGES.FROM.USER = 0 OR NOT MESSAGE.REMINDER THEN _
RETURN
IF PRIVATE.DOOR THEN _
GOTO 1961
A$ = "Mail you left"
GOSUB 12976
1960 FOR I = 1 TO MESSAGES.FROM.USER
A$ = B$(I)
GOSUB 12978
NEXT
CALL SKIPLINE (1)
CALL QTPUT("Please <K>ill old/unneeded messages",1)
1961 REDIM B$(ADIM)
RETURN
'
' *****************************************************************************
' * E - COMMAND FROM MAIN MENU (ENTER MESSAGE) *
' *****************************************************************************
'
2000 IF LOW.MESSAGE.NUMBER > 0 AND _
ACTIVE.MESSAGES = MAXIMUM.MESSAGES THEN _
A$ = "No room for new messages! Try tomorrow" : _
GOSUB 12975 : _
GOTO 3650
2006 MESSAGE.PASSWORD$ = ""
SYSOP.COMMENT = FALSE
IF NOT REPLY THEN _
MESSAGE.TO$ = ""
2007 IF SYSOP.COMMENT THEN _
Z$ = COMMENTS.FILE$ : _
FT$ = "comment" _
ELSE Z$ = ACTIVE.MESSAGE.FILE$ : _
FT$ = "message"
2008 IF SYSOP.COMMENT THEN _
CALL FINDFREE : _
GOTO 2009
FREE.SPACE$ = "2000"
IF NEXT.MESSAGE.RECORD + 3 >= HIGHEST.MESSAGE.RECORD THEN _
FREE.SPACE$ = "1"
2009 IF VAL(FREE.SPACE$) < 2000 THEN _
A$ = "No room for " + FT$ : _
GOSUB 12979 : _
GOTO 3650
2010 LINES.IN.MESSAGE = 0
L = 0
X = 0
REDIM A$(ADIM)
IF SYSOP.COMMENT THEN _
GOTO 2100
IF SYSOP.MESSAGE THEN _
SYSOP.MESSAGE = FALSE : _
GOTO 2077
2020 IF REPLY THEN _
GOTO 2060
A$ = "To (Press [ENTER] for All)"
CALL SKIPLINE (1)
GOSUB 12995
IF LEN(B$(1)) > 30 THEN _
A$ = "30 Char. Max" : _
GOSUB 12979 : _
GOTO 2020
2030 IF Q = 0 THEN _
MESSAGE.TO$ = "ALL" _
ELSE CALL ALLCAPSD (B$(),1) : _
MESSAGE.TO$ = B$(1)
2035 A$ = "Subject"
GOSUB 12995
IF LEN(B$(1)) > 25 THEN _
A$ = "25 Char. Max" : _
GOSUB 12979 : _
GOTO 2035
2045 IF Q = 0 THEN _
RETURN 1200
CALL ALLCAPSD (B$(),1)
SUBJECT$ = B$(1)
2060 A$ = "Security: [K]ill, P)assword, R)eceiver, N)one, H)elp"
GOSUB 12995
IF Q = 0 THEN _
B$(1) = "K"
Z$ = LEFT$(B$(1),1)
CALL ALLCAPS (Z$)
ON INSTR("RKNPH",Z$) GOTO 2075,2090,2100,2075,2070
GOTO 2060
'
' *****************************************************************************
' * DISPLAY MESSAGE PROTECT HELP *
' *****************************************************************************
'
2070 FILE.NAME$ = HELP$(3)
GOSUB 1790
GOTO 2060
'
' *****************************************************************************
' * MAKE MESSAGE READ PROTECTED (ONLY ADDRESSEE AND SYSOP CAN READ IT) *
' *****************************************************************************
'
2075 IF MESSAGE.TO$ = "ALL" THEN _
CALL QTPUT("Message to ALL cannot be Receiver protected",1) : _
GOTO 2060
IF Z$ = "P" THEN _
GOTO 2088
2077 IF (START.HASH <> 1 OR INSTR(MESSAGE.TO$,"SYSOP") OR _
ACTIVE.USER.NAME$ = "SYSOP" OR _
INSTR(MESSAGE.TO$,SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$)) THEN _
GOTO 2081
2079 IF NOT REPLY AND START.HASH = 1 THEN _
TEMP.HASH.VALUE$ = MESSAGE.TO$ : _
FOUND = FALSE : _
SUIX = USER.FILE.INDEX : _
GOSUB 12600 : _
USER.FILE.INDEX = SUIX : _
GOSUB 12984 : _
IF NOT FOUND THEN _
A$ = MESSAGE.TO$ + " not active user" : _
GOSUB 1397 : _
GOTO 2020
2081 A$ = "Sending personal mail to " + MESSAGE.TO$
GOSUB 12979
2084 MESSAGE.PASSWORD$ = "^READ^"
GOTO 2100
2085 A$ = "Password"
GOSUB 12995
IF Q = 0 THEN _
GOTO 2085
IF LEN(B$(1)) > L THEN _
A$ = STR$(L) + " Chars. max" : _
GOSUB 12979 : _
GOTO 2085
IF L = 15 AND MID$(B$(1),1,1) = "!" THEN _
A$ = "Password can't begin with '!'" : _
GOSUB 12979 : _
GOTO 2085
RETURN
'
' *****************************************************************************
' * MAKE MESSAGE PASSWORD PROTECTED (USERS WITH PASSWORD AND SYSOP CAN READ) *
' *****************************************************************************
'
2088 A$ = "Receiver(s) Must KNOW PASSWORD TO READ msg. Use password (Y/N)"
GOSUB 12995
IF NO THEN _
GOTO 2070
L = 14
A1$ = "!"
GOSUB 2085
CALL ALLCAPSD (B$(),1)
GOTO 2092
'
' *****************************************************************************
' * MAKE MESSAGE KILL PROTECTED (ONLY SENDER, ADDRESSEE AND SYSOP CAN KILL) *
' *****************************************************************************
'
2090 L = 15
A1$ = ""
B$(1) = "^KILL^"
2092 MESSAGE.PASSWORD$ = A1$ + B$(1)
'
' *****************************************************************************
' * ENTER MAIN BODY OF MESSAGE *
' *****************************************************************************
'
2100 A$ = "Type " + _
FT$ + _
STR$(MAX.MESSAGE.LINES) + _
" lines max" + PRESS.ENTER$
GOSUB 12975
GOSUB 3200
2125 LINES.IN.MESSAGE = LINES.IN.MESSAGE + 1
A$ = RIGHT$(STR$(LINES.IN.MESSAGE),2) + ": " + A$(LINES.IN.MESSAGE)
GOSUB 12978
CALL LINEEDIT(LINES.IN.MESSAGE,RIGHT.MARGIN+1)
IF WAIT.EXPIRED THEN _
GOTO 10590_
ELSE IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
GOSUB 60000
IF A$(LINES.IN.MESSAGE) = "" THEN _
LINES.IN.MESSAGE = LINES.IN.MESSAGE-1 : _
GOTO 2300
2140 J = LINES.IN.MESSAGE
GOSUB 2200
IF X THEN _
GOTO 2300
GOTO 2125
2200 X = 0
IF J < (MAX.MESSAGE.LINES-2) THEN _
RETURN
A$ = MID$("2 lines leftLast line Full",12*(J-(MAX.MESSAGE.LINES-2)) + 1,12)
X = (J > (MAX.MESSAGE.LINES-1))
2210 GOSUB 12979
RETURN
'
' *****************************************************************************
' * FINAL MESSAGE DISPOSITION *
' *****************************************************************************
'
2300 GOSUB 12979
IF NOT EXPERT.USER THEN _
GOSUB 50400
2315 A$ = "Edit Sub-function <A,C,D,E,I,L,M,S,?>"
CALL SKIPLINE (1)
GOSUB 12995
IF Q = 0 THEN _
GOTO 2315
CALL ALLCAPSD (B$(),1)
Z$ = B$(1)
2325 IF Q > 1 AND Z$ <> "M" THEN _
L = VAL(B$(Q)) : _
GOSUB 3320
2330 ON INSTR("ACDEILMS?",Z$) GOTO 2400,2340,2500,2600,2800,3000,3100,3400,2345
GOTO 2300
'
' *****************************************************************************
' * CONTINUE ENTERING MESSAGE *
' *****************************************************************************
'
2340 GOSUB 3200
GOTO 2140
'
' *****************************************************************************
' * DISPLAY MESSAGE SUBCOMMANDS HELP FILE *
' *****************************************************************************
'
2345 FILE.NAME$ = HELP$(4)
GOSUB 1790
GOTO 2315
'
' *****************************************************************************
' * ABORT MESSAGE *
' *****************************************************************************
'
2400 A$ = "Abort " + FT$ + " (Y/N)"
CALL SKIPLINE (1)
GOSUB 12995
IF NOT YES THEN _
GOTO 2300
2430 A$ = "Aborted"
GOSUB 12975
GOTO 3650
'
' *****************************************************************************
' * DELETE MESSAGE LINE *
' *****************************************************************************
'
2500 GOSUB 12979
IF Q = 1 THEN _
A$ = "Delete " : _
GOSUB 12978 : _
GOSUB 3300
2520 A$ = "Line #" + STR$(L)
GOSUB 12979
A$ = A$(L)
GOSUB 12977
A$ = "Delete this line (Y/N)"
GOSUB 12995
IF NOT YES THEN _
A$ = "NOT Deleted" : _
GOSUB 12979 : _
GOTO 2300
2550 LINES.IN.MESSAGE = LINES.IN.MESSAGE-1
FOR X = L TO LINES.IN.MESSAGE
A$(X) = A$(X + 1)
NEXT
A$(LINES.IN.MESSAGE + 1) = ""
A$ = "Deleted Line #" + STR$(L)
GOSUB 12979
GOTO 2300
'
' *****************************************************************************
' * EDIT MESSAGE LINE *
' *****************************************************************************
'
2600 GOSUB 12979
IF Q = 1 THEN _
GOSUB 3300
2620 A$ = "Line #" + STR$(L) + " is:" + RETURN.LINE.FEED$ + A$(L)
GOSUB 12977
IF NOT EXPERT.USER THEN _
CALL QTPUT ("Search & replace",1)
A$ = "Search for ([ENTER] quits)"
GOSUB 12995
IF Q = 0 THEN _
GOTO 2300
X$ = B$(1)
IF Q > 1 THEN _
Y$ = B$(2): _
GOTO 2660
A$="And replace by"
GOSUB 12995
Y$ = B$(1)
2660 X = INSTR(1,A$(L),X$)
IF X = 0 THEN _
GOTO 2710
2670 FF = LEN(X$)
JJ = LEN(Y$)
IF FF = JJ THEN _
MID$(A$(L),X) = Y$ : _
GOTO 2620
2690 DF$ = LEFT$(A$(L),X-1)
A$(L) = DF$ + Y$ + MID$(A$(L),X + FF)
GOTO 2620
2710 A$ = "String <" + X$ + "> not found in line" + STR$(L)
GOSUB 12979
GOTO 2300
'
' *****************************************************************************
' * INSERT MESSAGE LINE *
' *****************************************************************************
'
2800 IF LINES.IN.MESSAGE >= MAX.MESSAGE.LINES AND NOT SYSOP THEN _
A$ = "Message full" : _
GOSUB 12979 : _
GOTO 2920
2820 GOSUB 12979
IF Q = 1 THEN _
A$ = "Before " : _
GOSUB 12978 : _
GOSUB 3300
2830 LL = LINES.IN.MESSAGE
K = LINES.IN.MESSAGE-L
FOR X = L TO LINES.IN.MESSAGE
B$(X + 1-L) = A$(X)
A$(X) = ""
NEXT
LINES.IN.MESSAGE = L
2840 A$ = RIGHT$(STR$(LINES.IN.MESSAGE),2) + ": "
GOSUB 12978
CALL LINEEDIT(LINES.IN.MESSAGE,RIGHT.MARGIN+1)
IF A$(LINES.IN.MESSAGE) = "" THEN _
GOTO 2920
2870 LINES.IN.MESSAGE = LINES.IN.MESSAGE + 1
J = LINES.IN.MESSAGE + K-1
GOSUB 2200
IF NOT X THEN _
GOTO 2840
2920 FOR X = 1 TO K + 1
A$(LINES.IN.MESSAGE + X-1) = B$(X)
NEXT
REDIM B$(ADIM)
LINES.IN.MESSAGE = LL + LINES.IN.MESSAGE-L
GOTO 2300
'
' *****************************************************************************
' * LIST MESSAGE CONTENTS *
' *****************************************************************************
'
3000 STOP.INTERRUPTS = TRUE
GOSUB 12979
IF Q = 1 THEN _
L = 1 : _
A$ = "To: " + MESSAGE.TO$ + " Re: " + SUBJECT$ : _
GOSUB 12979 : _
GOSUB 3200
3020 FOR X = L TO LINES.IN.MESSAGE
IF RET THEN _
GOTO 2300 _
ELSE A$ = RIGHT$(STR$(X),2) + ": " + A$(X)
3030 GOSUB 12979
NEXT
GOTO 2300
'
' *****************************************************************************
' * CHANGE MARGIN WIDTH *
' *****************************************************************************
'
3100 GOSUB 12979
IF Q <> 1 THEN _
B$(1) = B$(Q) : _
GOTO 3130
3115 A$ = "SET Right-Margin from" + STR$(RIGHT.MARGIN) + " TO (8...72)"
GOSUB 12995
IF LEN(B$(1)) > 2 THEN _
GOTO 3140
3130 X = VAL(B$(1))
IF X > 7 AND X < 73 THEN _
RIGHT.MARGIN = X : _
A$ = "Margin now" + STR$(RIGHT.MARGIN) : _
GOTO 3150
3140 A$ = "Invalid - Margin UNCHANGED"
3150 GOSUB 12979
IF UTILITY.MARGIN.CHANGE THEN _
RETURN
GOTO 2300
3200 A$ = " [" + STRING$(RIGHT.MARGIN-2,45) + "]"
GOSUB 12975
RETURN
3300 A$ = "Line #"
GOSUB 12995
L = VAL(B$(1))
3320 IF L >= 1 AND L <= LINES.IN.MESSAGE THEN _
RETURN
3330 IF Q = 0 THEN _
RETURN 2300
3340 A$ = "No such line"
GOSUB 12979
RETURN 2300
'
' *****************************************************************************
' * SAVE MESSAGE *
' *****************************************************************************
'
3400 IF SYSOP.COMMENT THEN _
GOTO 1850
3405 GOSUB 4910
MESSAGE.RECORD.SAVE$ = MESSAGE.RECORD$
A$ = "Adding new msg #" + STR$(HIGH.MESSAGE.NUMBER + 1)
IF NOT LOCAL.USER THEN _
CALL UPDTCALR (A$,1)
GOSUB 12978
SL = 0
N$ = ""
IF LOW.MESSAGE.NUMBER = 0 THEN _
LOW.MESSAGE.NUMBER = 1 : _
HIGH.MESSAGE.NUMBER = 1 : _
GOTO 3410
HIGH.MESSAGE.NUMBER = HIGH.MESSAGE.NUMBER + 1
3410 ACTIVE.MESSAGES = ACTIVE.MESSAGES + 1
MESSAGE.NUMBER$ = STR$(HIGH.MESSAGE.NUMBER) + _
SPACE$(5-LEN(STR$(HIGH.MESSAGE.NUMBER)))
IF MESSAGE.PASSWORD$ = "^READ^" THEN _
MID$(MESSAGE.NUMBER$,1,1) = "*"
3460 MESSAGE.FROM$ = ACTIVE.USER.NAME$ + SPACE$(31-LEN(ACTIVE.USER.NAME$))
MESSAGE.TO$ = MESSAGE.TO$ + SPACE$(31-LEN(MESSAGE.TO$))
MID$(MESSAGE.TO$,23,8) = TIME$
SUBJECT$ = SUBJECT$ + SPACE$(25-LEN(SUBJECT$))
MESSAGE.PASSWORD$ = MESSAGE.PASSWORD$ + SPACE$(15-LEN(MESSAGE.PASSWORD$))
FOR J = 1 TO LINES.IN.MESSAGE
A$(J) = A$(J) + CHR$(227)
SL = SL + LEN(A$(J))
NEXT
IF SL MOD 128 = 0 THEN _
N$ = STR$(SL\128 + 1) _
ELSE N$ = STR$(SL\128 + 2)
3530 GET 1,NEXT.MESSAGE.RECORD
M(ACTIVE.MESSAGES,1) = NEXT.MESSAGE.RECORD
M(ACTIVE.MESSAGES,2) = HIGH.MESSAGE.NUMBER
LSET MESSAGE.RECORD$ = MESSAGE.NUMBER$ + _
MESSAGE.FROM$ + _
MESSAGE.TO$ + _
CURRENT.DATE$ + _
SUBJECT$ + _
MESSAGE.PASSWORD$ + _
ACTIVE.MESSAGE$ + _
N$
PUT 1,NEXT.MESSAGE.RECORD
NEXT.MESSAGE.RECORD = NEXT.MESSAGE.RECORD + VAL(N$)
N$ = ""
FOR J = 1 TO LINES.IN.MESSAGE
A$ = "."
GOSUB 12978
N$ = N$ + A$(J)
IF LEN(N$) > 127 THEN _
LSET MESSAGE.RECORD$ = N$ : _
PUT 1 : _
N$ = MID$(N$,129)
3630 NEXT
IF LEN(N$) > 0 THEN _
LSET MESSAGE.RECORD$ = N$ : _
PUT 1
REDIM A$(ADIM)
3640 GOSUB 12979
LSET MESSAGE.RECORD$ = MESSAGE.RECORD.SAVE$
GOSUB 24000
GOSUB 12985
3650 IF REPLY THEN _
CALL OPENMSG : _
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360 : _
ELSE FIELD 1, 128 AS MESSAGE.RECORD$ : _
RETURN
RETURN 1200
'
' *****************************************************************************
' * K - COMMAND FROM MAIN MENU (KILL MESSAGE) *
' *****************************************************************************
'
3900 KILL.MESSAGE = FALSE
GOSUB 12979
IF Q <> 1 THEN _
MESSAGE.TO.KILL = VAL(B$(Q)) : _
GOTO 3950
3930 A$ = "Msg # to Kill"
GOSUB 12995
IF Q = 0 THEN _
RETURN
MESSAGE.TO.KILL = VAL(B$(Q))
GOSUB 12979
3950 CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
FIELD 1, 128 AS MESSAGE.RECORD$
CALL KILLMSG (MESSAGE.TO.KILL,ACTIVE.MESSAGES)
4040 IF KILL.MESSAGE THEN _
RETURN
RETURN 1200
'
' *****************************************************************************
' * L - COMMAND FROM UTILITY MENU (LINE FEEDS TOGGLE) *
' *****************************************************************************
'
4100 LINE.FEEDS = NOT LINE.FEEDS
IF LOCAL.USER THEN _
LINE.FEEDS = TRUE
A$ = "Line Feeds " + MID$("OffOn",1-3*LINE.FEEDS,3)
CALL SETCRLF
GOSUB 12979
RETURN
'
' ***************************************************************
' * TOGGLE WHETHER BULLETINS SKIPPED ON LOGON IF NONE NEW *
' ***************************************************************
'
4120 CHECK.BULLETIN.LOGON = NOT CHECK.BULLETIN.LOGON
A$ = MID$("SKIP CHECK",1-5*CHECK.BULLETIN.LOGON,5) + _
" old BULLETINS in logon"
GOSUB 12979
RETURN
'
' ***************************************************************
' * TOGGLE WHETHER SKIP NEW FILE DOWNLOAD ON LOGON *
' ***************************************************************
'
4140 SKIP.FILES.LOGON = NOT SKIP.FILES.LOGON
A$ = MID$("CHECKSKIP ",1-5*SKIP.FILES.LOGON,5) + _
" new files in logon"
GOSUB 12979
RETURN
4200 PROMPT.BELL = NOT PROMPT.BELL
A$ = "Prompt Bell " + MID$("OffOn",1-3*PROMPT.BELL,3)
GOSUB 12979
RETURN
'
' *****************************************************************************
' * X - COMMAND EXPERT TOGGLE (GLOBAL) *
' *****************************************************************************
'
4240 EXPERT.USER = NOT EXPERT.USER
A$ = MID$("NoviceExpert",1-6*EXPERT.USER,6)
GOSUB 12979
RETURN
'
' *****************************************************************************
' * T)opic - QUICK SCAN MESSAGES *
' *****************************************************************************
'
4320 QUICK.SCAN.MESSAGES = TRUE
READ.MESSAGES = FALSE
SCAN.MESSAGES = FALSE
GOTO 4350
'
' *****************************************************************************
' * R - COMMAND FROM MAIN MENU (READ MESSAGES) *
' *****************************************************************************
'
4330 QUICK.SCAN.MESSAGES = FALSE
READ.MESSAGES = TRUE
SCAN.MESSAGES = FALSE
IF NOT LOCAL.USER THEN _
CALL UPDTCALR ("Read Messages...",1)
GOSUB 1300
GOTO 4350
'
' *****************************************************************************
' * S - COMMAND FROM MAIN MENU (SCAN MESSAGE HEADERS) *
' *****************************************************************************
'
4340 IF Q < 2 THEN _
GOSUB 1300
4345 QUICK.SCAN.MESSAGES = FALSE
READ.MESSAGES = FALSE
SCAN.MESSAGES = TRUE
'
' *****************************************************************************
' * MESSAGE READ MAINLINE (QUICK SCAN, READ & SCAN) ALL USE THIS ROUTINE *
' *****************************************************************************
'
4350 CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1,128 AS MESSAGE.RECORD$
IF Q > 2 AND INSTR(B$(Q),"*") THEN _
Z$ = "" : _
GOTO 4360
IF Q > 2 AND VAL(B$(Q)) = 0 THEN _
Z$ = B$(Q) : _
CALL ALLCAPS (Z$) : _
Q = Q-1 _
ELSE Z$ = ""
4360 LG$(11) = Z$
MESSAGES.SELECTED.INDEX = 1
NUMBER.MESSAGES.SELECTED = Q
ADDRESSED.TO.USER = FALSE
NON.STOP = (PAGE.LENGTH < 1)
4370 MESSAGES.SELECTED.INDEX = MESSAGES.SELECTED.INDEX + 1
4371 IF MESSAGES.SELECTED.INDEX <= NUMBER.MESSAGES.SELECTED THEN _
CURRENT.MESSAGE = VAL(B$(MESSAGES.SELECTED.INDEX)) : _
GOTO 4415
4380 NON.STOP = FALSE
ADDRESSED.TO.USER = FALSE
A$ = "Msg # (" + _
STR$(LOW.MESSAGE.NUMBER) + _
" to" + _
STR$(M(ACTIVE.MESSAGES,2)) + _
", *, <H>elp)"
IF EXPERT.USER THEN _
GOTO 4400
4390 IF READ.MESSAGES THEN _
A$ = A$ + " to Retrieve"+PRESS.ENTER$ _
ELSE A$ = "Starting at " + A$
4400 GOSUB 12995
IF Q = 0 THEN _
RETURN
IF INSTR("Hh",LEFT$(B$(1),1)) THEN _
FILE.NAME$ = HELP$(7) : _
GOSUB 1790 : _
RETURN
MESSAGES.SELECTED.INDEX = 0
NUMBER.MESSAGES.SELECTED = Q
GOTO 4370
4415 FORWARD = FALSE
REVERSE = FALSE
IF B$(MESSAGES.SELECTED.INDEX) = "*" THEN _
CURRENT.MESSAGE = LAST.MESSAGE.READ + 1 : _
FORWARD = TRUE : _
GOTO 4430
4416 IF INSTR("Mm",B$(MESSAGES.SELECTED.INDEX)) THEN _
ADDRESSED.TO.USER = TRUE : _
GOTO 4370
IF CURRENT.MESSAGE = 0 THEN _
RETURN
GOSUB 12979
4430 IF RIGHT$(B$(MESSAGES.SELECTED.INDEX),1) = "+" THEN _
FORWARD = TRUE
IF RIGHT$(B$(MESSAGES.SELECTED.INDEX),1) = "-" THEN _
REVERSE = TRUE : _
GOTO 4490
4450 MESSAGE.DIM.INDEX = 1
4452 IF MESSAGE.DIM.INDEX > ACTIVE.MESSAGES THEN _
GOTO 4515
IF READ.MESSAGES AND _
M(MESSAGE.DIM.INDEX,2) = CURRENT.MESSAGE THEN _
GOTO 4520
4470 IF ((READ.MESSAGES AND FORWARD) OR _
QUICK.SCAN.MESSAGES OR SCAN.MESSAGES) AND _
M(MESSAGE.DIM.INDEX,2) >= CURRENT.MESSAGE THEN _
GOTO 4520
4480 MESSAGE.DIM.INDEX = MESSAGE.DIM.INDEX + 1
GOTO 4452
4490 MESSAGE.DIM.INDEX = ACTIVE.MESSAGES
4492 IF MESSAGE.DIM.INDEX < 1 THEN _
GOTO 4515
IF M(MESSAGE.DIM.INDEX,2) <= CURRENT.MESSAGE THEN _
GOTO 4540
4510 MESSAGE.DIM.INDEX = MESSAGE.DIM.INDEX - 1
GOTO 4492
4515 A$ = "No such msg #" + STR$(CURRENT.MESSAGE)
GOSUB 12979
GOTO 4370
4520 ENDING.MESSAGE.INDEX = MESSAGE.DIM.INDEX
IF READ.MESSAGES AND NOT FORWARD THEN _
GOTO 4560
4530 STARTING.MESSAGE.INDEX = MESSAGE.DIM.INDEX
ENDING.MESSAGE.INDEX = ACTIVE.MESSAGES
SO = 1
GOTO 4550
4540 STARTING.MESSAGE.INDEX = MESSAGE.DIM.INDEX
ENDING.MESSAGE.INDEX = 1
SO = -1
4550 XXX = ENDING.MESSAGE.INDEX + SO
MESSAGE.DIM.INDEX = STARTING.MESSAGE.INDEX
4552 IF MESSAGE.DIM.INDEX = XXX THEN _
GOTO 4637
4560 GET 1,M(MESSAGE.DIM.INDEX,1)
PASSWORD.FAILED = 0
UH = 0
Z$ = MID$(MESSAGE.RECORD$,101,15)
X = 1
4561 FF = INSTR(MID$(MESSAGE.RECORD$,X),ACTIVE.USER.NAME$)
IF FF > 0 THEN _
X = LEN(ACTIVE.USER.NAME$) + FF : _
IF (FF < 7 OR MID$(MESSAGE.RECORD$,FF-1,1) = " ") AND (X > 66 OR MID$(MESSAGE.RECORD$,X,1) = " ") THEN _
UH = TRUE _
ELSE IF FF < 37 THEN _
X = 37 : _
GOTO 4561
4562 IF NOT SYSOP THEN _
IF INSTR(MESSAGE.RECORD$,"^READ^") > 0 AND NOT UH THEN _
PASSWORD.FAILED = TRUE : _
IF FORWARD OR REVERSE THEN _
GOTO 4635
4563 CURRENT.MESSAGE = VAL(MID$(MESSAGE.RECORD$,2,4))
IF ADDRESSED.TO.USER AND NOT UH THEN _
GOTO 4625
4580 IF INSTR(MESSAGE.RECORD$,LG$(11)) = 0 THEN _
GOTO 4635
4581 IF MID$(MESSAGE.RECORD$,116,1) = DELETED.MESSAGE$ THEN _
GOTO 4630
4582 PG = FALSE
IF MID$(Z$,1,1) = "!" THEN _
IF NOT SYSOP THEN _
PG = TRUE : _
PASSWORD.SAVE$ = MID$(Z$,2) + " " : _
ATTEMPTS.ALLOWED = 0 : _
GOSUB 665
4584 IF PASSWORD.FAILED AND _
(QUICK.SCAN.MESSAGES OR (SCAN.MESSAGES AND NOT PG)) THEN _
GOTO 4635
4585 IF PASSWORD.FAILED THEN _
IF PG THEN _
SJ$ = "<PASSWORD>" _
ELSE SJ$ = "<PROTECTED>" _
ELSE SJ$ = MID$(MESSAGE.RECORD$,76,25)
4590 IF QUICK.SCAN.MESSAGES THEN _
A$ = LEFT$(MESSAGE.RECORD$,5) : _
A$ = LEFT$(A$ + SPACE$(2),INSTR(A$ +SPACE$(2),SPACE$(2))-1) : _
A$ = A$ + " " + SJ$ : _
GOSUB 12979 : _
GOTO 4630
4600 GOSUB 8000
IF SCAN.MESSAGES OR RET THEN _
GOTO 4630
IF M(MESSAGE.DIM.INDEX,2) > LAST.MESSAGE.READ THEN _
LAST.MESSAGE.READ = M(MESSAGE.DIM.INDEX,2)
4610 IF NOT PASSWORD.FAILED THEN _
GOTO 4613
IF PG THEN _
ATTEMPTS.ALLOWED = 2 : _
GOSUB 667
4611 IF PASSWORD.FAILED THEN _
GOTO 4625
4613 GOSUB 9000
CALL SKIPLINE (1)
4614 GOSUB 41000
KILL.MESSAGE = FALSE
REPLY = FALSE
IF NON.STOP THEN _
GOTO 4625
4616 IF EXPERT.USER THEN _
A$ = "More [Y],N,NS,RE" + MID$(",K",1,-UH*2)_
ELSE A$ = "MORE [Y]es,N)o,NS)non-stop,RE)ply" + _
MID$(",K)ill",1,-UH*7)
NO.ADVANCE = TRUE
GOSUB 12995
CALL WIPELINE (43)
IF NO THEN _
GOTO 4650
'
' *****************************************************************************
' * KILL CURRENT MESSAGE *
' *****************************************************************************
'
4618 IF KILL.MESSAGE AND (UH OR SYSOP) THEN _
IF USER.SECURITY.LEVEL >= OPT.SEC(9) THEN _
GOSUB 62520 : _
MESSAGE.TO.KILL = CURRENT.MESSAGE : _
GOSUB 3950 : _
GOSUB 62530 : _
GOTO 4625 _
ELSE VIOLATION$ = "MORE KILL" : _
GOSUB 1380 : _
GOTO 4625
'
' *****************************************************************************
' * REPLY TO CURRENT MESSAGE *
' *****************************************************************************
'
4620 IF NOT REPLY THEN _
GOTO 4625
4621 IF USER.SECURITY.LEVEL < OPT.SEC(5) THEN _
VIOLATION$ = "MORE RE" : _
GOSUB 1380 : _
REPLY = FALSE : _
GOTO 4625
IF LEFT$(SUBJECT$,3) <> "(R)" THEN _
SUBJECT$ = "(R)" + LEFT$(SUBJECT$,22)
4622 MESSAGE.TO$ = MESSAGE.FROM$
MESSAGE.FROM$ = ACTIVE.USER.NAME$
GOSUB 62520
GOSUB 2000
REPLY = FALSE
GOSUB 62530
GOTO 4560
4625 IF NOT FORWARD AND NOT REVERSE THEN _
GOTO 4370
4630 GOSUB 57110
4631 CALL CARRIER
IF SUBROUTINE.PARAMETER THEN _
RETURN 10595
IF RET THEN _
RETURN
4635 IF SO = 0 THEN _
SO = 1
MESSAGE.DIM.INDEX = MESSAGE.DIM.INDEX + SO
GOTO 4552
4637 IF READ.MESSAGES THEN _
GOTO 4370
4650 GOSUB 12979
CALL QTPUT ("End of Messages",1)
RETURN
'
' *****************************************************************************
' * O - COMMAND FROM MAIN MENU (OPERATOR PAGE) *
' *****************************************************************************
'
4700 IF NOT SYSOP.AVAILABLE THEN _
GOTO 4708
4705 CALL QTPUT ("Chat. Remote Conversation",1)
JJ = VAL(MID$(TIME$,1,2))*100 + VAL(MID$(TIME$,4,2))
IF (JJ > START.OFFICE.HOURS AND JJ < END.OFFICE.HOURS) OR SYSOP.ANNOY THEN _
GOTO 4710
4707 GOTO 4750
4708 A$ = "SYSOP in from" + _
STR$(START.OFFICE.HOURS) + _
" to" + _
STR$(END.OFFICE.HOURS) + ","
GOSUB 12979
GOTO 4755
4710 A$ = "Page " + SYSOP.FIRST.NAME$ + " ([Y]/N)"
CALL SKIPLINE (1)
GOSUB 12995
IF NO THEN _
RETURN
PAGE.COUNT = 0
A$ = "Paging " + SYSOP.FIRST.NAME$ + " now"
GOSUB 12978
CALL FINDTIME (PAGE.TIME.MAX!)
PAGE.TIME.MAX! = PAGE.TIME.MAX! + 30
4730 CALL DELAYIT (1)
4735 PAGE.COUNT = PAGE.COUNT + 1
IF INKEY$ = ESCAPE$ THEN _
GOTO 4765
4740 IF PAGE.COUNT MOD 2 THEN _
A$ = PAGING.PRINTER.SUPPORT$ + CHR$(7) : _
IF LEN(PAGING.PRINTER.SUPPORT$) = 3 AND PRINTER THEN _
LPRINT CHR$(7);
4745 GOSUB 12978
CALL FINDTIME (TI!)
IF TI! < PAGE.TIME.MAX! THEN _
GOTO 4730
GOSUB 12979
4750 CALL QTPUT(SYSOP.FIRST.NAME$ + " not responding",1)
4755 CALL QTPUT ("Try a message or comment",1)
CALL UPDTCALR ("Operator paged " + LEFT$(TIME$,5),2)
RETURN
4765 CALL UPDTCALR ("Paged & chatted with Sysop",1)
CALL QTPUT ("SYSOP in! " + _
FIRST.NAME$ + _
", this is " + _
SYSOP.FIRST.NAME$ + _
" go ahead!",1)
4770 CM = TRUE
CALL FINDTIME (TIME.CHAT.STARTED!)
SUBROUTINE.PARAMETER = 1
CALL LINE25
A$(2) = ""
4775 CALL LINEEDIT (1,72)
IF FUNCTION.KEY <> 0 THEN _
GOSUB 60010 : _
A$(2) = A$(1) _
ELSE IF KEY.PRESSED$ = ESCAPE$ OR SUBROUTINE.PARAMETER = -1 THEN _
GOTO 4777
A$(1) = ""
IF A$(2) <> "" THEN_
A$ = A$(2) : _
A$(1) = A$(2) : _
A$(2) = "" _
ELSE _
A$ = ""
GOSUB 12978
GOTO 4775
4777 CM = 0
CALL FINDTIME (TI!)
ELAPSED! = FIX(TI! - TIME.CHAT.STARTED!)
IF ELASPED! < 0 THEN _
ELASPED! = TI! + (86400! - TIME.CHAT.STARTED!)
SECONDS.PER.SESSION! = SECONDS.PER.SESSION! + ELAPSED!
IF NOT LOCAL.USER THEN _
AUTO.LOGOFF! = TI! + WAIT.BEFORE.DISCONNECT
CALL QTPUT("Chat ended. Returning to normal operation",2)
RETURN 1205
'
' *****************************************************************************
' * S - COMMAND FROM UTILITY MENU (STATISTICS) *
' *****************************************************************************
'
4850 A$ = "RBBS-PC " + VERSION.ID$ + " Node " + NODE.ID$
GOSUB 12975
IF NOT CONFERENCE.MODE THEN _
A$ = "Caller # " + STR$(CALLS.TODATE!) + " "
4855 A$ = A$ + "# active msgs:" + STR$(ACTIVE.MESSAGES)
A$ = A$ + " Next msg #" + STR$(HIGH.MESSAGE.NUMBER + 1)
LAST.MESSAGE.READ = -LAST.MESSAGE.READ * _
(LAST.MESSAGE.READ <= HIGH.MESSAGE.NUMBER)
IF LAST.MESSAGE.READ > 0 THEN _
A$ = A$ + " Last msg read:" + STR$(LAST.MESSAGE.READ)
4857 GOSUB 12976
IF SYSOP THEN _
USER.WORK = (HIGHEST.USER.RECORD * .95) + 1: _
A$ = "USERS: used" + _
STR$(CURRENT.USER.COUNT-1) + _
" avl" + _
STR$(USER.WORK - CURRENT.USER.COUNT) + _
" MSGS: used" + _
STR$(ACTIVE.MESSAGES) + _
" avl" + _
STR$(MAXIMUM.MESSAGES-ACTIVE.MESSAGES) + _
" MSG REC: used" + _
STR$(NEXT.MESSAGE.RECORD-1) + _
" avl" + _
STR$(HIGHEST.MESSAGE.RECORD + 1 + NODES.IN.SYSTEM - NEXT.MESSAGE.RECORD) : _
GOSUB 12976
4860 GOSUB 12979
RETURN
4900 CONFERENCE.MODE = TRUE
IF NOT LOCAL.USER THEN _
CALL UPDTCALR ("Entered " + GRN$,1)
CALL QTPUT("Welcome to " + GRN$,1)
4905 CALL FINDIT (FILE.NAME$)
IF OK THEN _
GOSUB 43030 : _
GOSUB 6000
4910 GOSUB 12986
CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
IF LOF(1) = 0 THEN _
DF$ = ACTIVE.MESSAGE.FILE$ : _
CLOSE 1 : _
KILL ACTIVE.MESSAGE.FILE$ : _
GOSUB 12987 : _
GOTO 13600
GOSUB 23000
RETURN
'
' *****************************************************************************
' * REMOVE NON ALPHA CHARACTERS FROM STRING *
' *****************************************************************************
'
5100 X$ = ""
FOR Z = 1 TO LEN(Z$)
IF ASC(MID$(Z$,Z,1)) < 32 OR ASC(MID$(Z$,Z,1)) > 90 THEN _
GOTO 5105
X$ = X$ + MID$(Z$,Z,1)
5105 NEXT
Z$ = X$
RETURN
'
' *****************************************************************************
' * P - COMMAND FROM UTILITY MENU (PASSWORD CHANGE) *
' *****************************************************************************
'
5110 A$ = "Enter new password" + PRESS.ENTER$
GOSUB 45010
IF Q = 0 THEN _
RETURN
IF LEN(B$(1)) > 15 OR B$(1) = SPACE$(LEN(B$(1))) THEN _
GOTO 5110
CALL ALLCAPSD (B$(),1)
Z$ = B$(1)
5120 A$ = "Reenter new password"
GOSUB 45010
IF Q = 0 THEN _
RETURN
CALL ALLCAPSD (B$(),1)
IF Z$ <> B$(1) THEN _
A$ = "Passwords don't match!" : _
GOSUB 12979 : _
RETURN
5125 IF MAXIMUM.PASSWORD.CHANGES AND _
CHANGES.THIS.SESSION > _
MAXIMUM.PASSWORD.CHANGES AND _
NOT SYSOP THEN _
A$ = "No changes permitted" : _
GOSUB 12975 : _
RETURN _
ELSE PASSWORD.CHANGE.ALLOWED = TRUE : _
GOSUB 5140 : _
IF NOT FOUND THEN _
GOTO 5129 _
ELSE A$ = "Temporary change" : _
GOSUB 12975 : _
PASSWORD$ = TEMP.PASSWORD$ : _
SECONDS.PER.SESSION! = TEMP.TIME.ALLOWED * 60 : _
USER.SECURITY.LEVEL = TEMP.SECURITY.LEVEL : _
GOSUB 41070 : _
SYSOP = (USER.SECURITY.LEVEL >= SYSOP.SECURITY.LEVEL) : _
CALL CALLOPT
IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
B$(1) = "********"
5126 CALL UPDTCALR ("Used temp password " + B$(1),2)
RETURN
5129 GOSUB 12989
CALL OPENUSER
GOSUB 9450
5130 GET 5,USER.FILE.INDEX
CALL ALLCAPSD (B$(),1)
LSET PASSWORD$ = B$(1)
PUT 5,USER.FILE.INDEX
CLOSE 5
GOSUB 12991
A$ = "Password changed"
STOP.INTERRUPTS = FALSE
GOSUB 12975
IF MAXIMUM.PASSWORD.CHANGES THEN _
CHANGES.THIS.SESSION = CHANGES.THIS.SESSION + 1
5131 CALL UPDTCALR ("New Password " + B$(1),2)
RETURN
'
' *****************************************************************************
' * SEARCH "PASSWORDS" FILE FOR TEMPORARY PASSWORDS *
' *****************************************************************************
'
5135 IF USER.SECURITY.LEVEL = DEFAULT.SECURITY.LEVEL THEN _
RETURN
Z$ = ""
Z = 0
GOSUB 5140
IF FOUND THEN _
MINUTES.PER.SESSION! = TEMP.TIME.ALLOWED : _
IF TEMP.REG.PERIOD > 0 THEN _
DAYS.IN.SUBSCRIPTION.PERIOD = TEMP.REG.PERIOD
RETURN
5140 FOUND = FALSE
CALL OPENWORK (PASSWORDS.FILE$)
IF EC = 53 THEN _
CALL UPDTCALR ("Missing file " + PASSWORDS.FILE$,2) : _
IF Z = 1 THEN _
CALL ALLCAPSD (B$(),1) : _
Z$ = B$(1) : _
GOTO 5160 _
ELSE GOTO 5160
Z$ = Z$ + SPACE$(15-LEN(Z$))
5150 IF EOF(2) THEN _
GOTO 5160
5151 INPUT #2,TEMP.PASSWORD$,TEMP.SECURITY.LEVEL, _
TEMP.TIME.ALLOWED,TEMP.REG.PERIOD
IF LEN(TEMP.PASSWORD$) > 15 THEN _
GOTO 5150
TEMP.PASSWORD$ = TEMP.PASSWORD$ + SPACE$(15-LEN(TEMP.PASSWORD$))
IF Z$ <> TEMP.PASSWORD$ THEN _
GOTO 5150
IF PASSWORD.CHANGE.ALLOWED AND _
USER.SECURITY.LEVEL >= MINIMUM.SECURITY.FOR.TEMP.PASSWORD THEN _
FOUND = TRUE _
ELSE IF USER.SECURITY.LEVEL = TEMP.SECURITY.LEVEL THEN _
FOUND = TRUE _
ELSE GOTO 5150
5160 RETURN
' *****************************************************************************
' * COMPUTE THE NUMBER OF DAYS REMAINING UNTIL SUBSCRIPTION EXPIRES *
' *****************************************************************************
'
5170 IF RESTRICT.BY.DATE THEN _
CALL COMPDATE (USER.REG.YY,USER.REG.MM,USER.REG.DD,USER.COMPUTE.DATE!): _
REG.DAYS.REMAINING = USER.COMPUTE.DATE! + _
DAYS.IN.SUBSCRIPTION.PERIOD - _
TODAY.COMPUTE.DATE! _
ELSE REG.DAYS.REMAINING = 365
RETURN
5200 A$ = "CHANGE page length from" + _
STR$(PAGE.LENGTH) + _
" TO (0-255, 0=continuous)"
GOSUB 12995
IF Q = 0 THEN _
CALL QTPUT ("No change",1):_
RETURN
5230 A = VAL(B$(Q))
IF A < 0 OR A > 255 THEN _
GOTO 5200
PAGE.LENGTH = A
CALL QTPUT ("Set to"+STR$(PAGE.LENGTH),1)
RETURN
'
' *****************************************************************************
' * J - COMMAND FROM MAIN MENU (JOIN CONFERENCE) *
' *****************************************************************************
'
5300 CALL FINDIT (CONFERENCE.MENU$)
IF NOT OK THEN _
A$ = "There are no Active Conferences available!" : _
GOSUB 12976 : _
GOTO 2210
5310 IF Q > 1 THEN _
B$(1) = B$(2) : _
Q = 0 : _
IF LEN(B$(2)) > 1 OR _
(LEN(B$(2)) = 1 AND NOT INSTR("JLMQX",B$(2))) THEN _
GOTO 5322 _
ELSE GOTO 5317
5312 IF EXPERT.USER THEN _
GOTO 5315
5313 FILE.NAME$ = CONFERENCE.MENU$
GOSUB 43025
5315 A$ = "Conference Function <J>oin,<L>ist,<M>ain,<Q>uit,<X>pert"
GOSUB 12995
IF Q = 0 THEN _
GOSUB 12979 : _
RETURN _
ELSE Z$ = B$(1)
5317 CALL ALLCAPSD (B$(),1)
IF B$(1) = "X" THEN _
GOSUB 4240 : _
GOTO 5312
FF = INSTR("JLMQ",B$(1))
IF FF = 0 THEN _
GOTO 5312
ON FF GOTO 5320,5313,5350,2210
5320 IF Q > 1 THEN _
B$(1) = B$(2) : _
GOTO 5322
A$ = "Enter conference name"
GOSUB 12995
IF Q = 0 THEN _
GOTO 5312
5322 IF SYSOP OR LOCAL.USER THEN _
GOSUB 5700
5323 CALL ALLCAPSD (B$(),1)
IF LEN(B$(1)) = 1 AND B$(1) = "M" THEN _
GOTO 5350
GRN$ = B$(1)
Q = 0
IF LEN(GRN$) > 7 THEN _
EXPERT.USER = FALSE : _
GOTO 5312
Q = 0
IF INSTR(GRN$,".") THEN _
GOTO 5312
CALL BADFILE (GRN$,BAD.FILE.NAME.INDEX)
ON BAD.FILE.NAME.INDEX GOTO 5324,5350,5370
5324 FILE.NAME$ = MID$(MAIN.MESSAGE.FILE$,1,2) + GRN$ + "M.DEF"
CALL FINDIT (FILE.NAME$)
IF NOT OK THEN _
GOTO 5312
'
' *****************************************************************************
' * WHEN A CONFERENCE FILE IS FOUND, UPDATE THE PREVIOUS MESSAGE FILE CHECK- *
' * POINT RECORD *
' *****************************************************************************
'
GOSUB 12986
CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
GET 1,1
MID$(MESSAGE.RECORD$,57,5) = STR$(CURRENT.USER.COUNT)
MID$(MESSAGE.RECORD$,62,5) = STR$(HIGHEST.USER.RECORD)
PUT 1,1
GOSUB 12987
ACTIVE.MESSAGE.FILE$ = FILE.NAME$
GOSUB 5343
FILE.NAME$ = MID$(WELCOME.FILE$,1,2) + GRN$ + "W.DEF"
5325 IF ACTIVE.USER.NAME$ = "SYSOP" OR _
(CONFERENCE.MODE AND (ACTIVE.USER.FILE$ = MAIN.USER.FILE$)) THEN _
GOTO 5327
IF MAIN.USER.FILE.INDEX > 0 THEN _
GOSUB 12988 : _
CALL OPENUSER : _
GOSUB 9450 : _
GET 5,MAIN.USER.FILE.INDEX : _
CALL DEFAULTU : _
PUT 5,MAIN.USER.FILE.INDEX : _
GOSUB 12990
5327 ACTIVE.USER.FILE$ = MID$(ACTIVE.USER.FILE$,1,2) + GRN$ + "U.DEF"
UPDATE.DATE = TRUE
CALL FINDIT (ACTIVE.USER.FILE$)
IF OK THEN _
GOTO 5330
ACTIVE.USER.FILE$ = MAIN.USER.FILE$
UPDATE.DATE = FALSE
IF ACTIVE.USER.NAME$ <> "SYSOP" THEN _
TIX = MAIN.USER.FILE.INDEX : _
GOSUB 5382
GOTO 5345
5330 IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
GOTO 5345
GOSUB 12598
GOSUB 12984
5340 IF FOUND THEN _
USER.FILE.INDEX = LOC(5) : _
TIX = USER.FILE.INDEX : _
GOSUB 9500 : _
GOTO 5345
A$ = "You are not in conference " + GRN$
GOSUB 1397
GRN$ = "MAIN"
USER.FILE.INDEX = MAIN.USER.FILE.INDEX
ACTIVE.USER.FILE$ = MAIN.USER.FILE$
GOSUB 5382
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$
GOSUB 5343
CONFERENCE.MODE = FALSE
GOSUB 12979
RETURN
'
' *****************************************************************************
' * WHEN A CONFERENCE FILE IS FOUND, UPDATE THE APPROPRIATE POINTERS FROM THE *
' * NEW CONFERENCE *
' *****************************************************************************
'
5343 GOSUB 12986
CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
GOSUB 23000
RETURN
5345 GRN$ = GRN$ + " Conference"
IF UPDATE.DATE AND ACTIVE.USER.NAME$ <> "SYSOP" THEN _
LSET LAST.DATE.TIME.ON$ = CURRENT.DATE$ + _
" " + _
TIME.LOGGED.ON$ : _
PUT 5,USER.FILE.INDEX : _
GOSUB 12991
5347 GOSUB 4900
5348 GOSUB 12987
RETURN 900
5350 GRN$ = "MAIN"
Q = 0
IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
GOSUB 5700 : _
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$ : _
ACTIVE.USER.FILE$ = MAIN.USER.FILE$ : _
CONFERENCE.MODE = FALSE : _
GOSUB 12979 : _
CALL OPENUSER : _
GOSUB 9450 : _
GOSUB 1900 : _
RETURN 1200
IF NOT LOCAL.USER THEN _
CALL UPDTCALR ("Exited Conference",1)
5360 IF CONFERENCE.MODE THEN _
GOSUB 5380 : _
ACTIVE.USER.FILE$ = MAIN.USER.FILE$ : _
CONFERENCE.MODE = FALSE : _
CALL OPENUSER : _
GOSUB 9450 : _
USER.FILE.INDEX = MAIN.USER.FILE.INDEX : _
GET 5,USER.FILE.INDEX : _
GOSUB 9500 : _
GOSUB 1900
GOSUB 12979
IF COMMENTS.IN.CONFERENCE = 1 THEN _
COMMENTS.IN.CONFERENCE = 0 : _
RETURN
RETURN 1200
5370 GOSUB 1380
GOTO 5312
'
' *****************************************************************************
' * Update Users Record Whenever Leaves a Conference *
' *****************************************************************************
5380 IF TIX > 0 THEN _
GOSUB 12989 : _
CALL DEFAULTU : _
PUT 5,TIX : _
GOSUB 12991
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$
IF ACTIVE.USER.FILE$ = MAIN.USER.FILE$ THEN _
RETURN
ACTIVE.USER.FILE$ = MAIN.USER.FILE$
USER.FILE.INDEX = MAIN.USER.FILE.INDEX
5382 IF USER.FILE.INDEX < 1 THEN _
USER.SECURITY.LEVEL = DEFAULT.SECURITY.LEVEL : _
RETURN
CALL OPENUSER
GOSUB 9450
GET 5,USER.FILE.INDEX
GOSUB 9500
RETURN
'
' *****************************************************************************
' * R - COMMAND FROM UTILITY MENU (REVIEW PROFILE) *
' *****************************************************************************
'
5400 CALL SKIPLINE(2)
CALL QTPUT ("Your PROFILE (utilities reset)",1)
5410 EXPERT.USER = NOT EXPERT.USER
GOSUB 4240
GOSUB 43020
FF = INSTR("AXCKYIGW",USER.TRANSFER.DEFAULT$)
FF = FF-9*(FF < 1)
GOSUB 42810
UPPER.CASE = NOT UPPER.CASE
GOSUB 42960
LINE.FEEDS = NOT LINE.FEEDS
GOSUB 4100
GOSUB 42720
PROMPT.BELL = NOT PROMPT.BELL
GOSUB 4200
CHECK.BULLETIN.LOGON = NOT CHECK.BULLETIN.LOGON
GOSUB 4120
SKIP.FILES.LOGON = NOT SKIP.FILES.LOGON
GOSUB 4140
AUTODOWNLOAD.AVAILABLE = NOT AUTODOWNLOAD.AVAILABLE
GOSUB 1550
RETURN
'
' *****************************************************************************
' * B - COMMAND FROM UTILITY MENU (300 TO 450 BAUD CHANGE) *
' *****************************************************************************
'
5500 CALL BAUD450
IF LOCAL.USER OR NOT (SUBROUTINE.PARAMETER OR C=20) THEN_
RETURN
5502 RETURN 10595 'Entry point when have double nested gosub
'
' *****************************************************************************
' * PROVIDE (Y),N,NS MESSAGES FOR TEXT FILES LONGER THAN PAGE LENGTH *
' *****************************************************************************
'
5600 GOSUB 41000
CALL FINDTIME(AUTO.LOGOFF!)
AUTO.LOGOFF! = AUTO.LOGOFF! + WAIT.BEFORE.DISCONNECT
IF NON.STOP THEN _
RETURN
IF EXPERT.USER THEN _
A$ = "More [Y],N,NS"_
ELSE A$ = "MORE: [Y]es, N)o, NS)non-stop"
NO.ADVANCE = TRUE
GOSUB 12995
CALL WIPELINE (33)
RETURN
'
' *****************************************************************************
' * SAVE SYSOP LAST MESSAGE READ POINTER *
' *****************************************************************************
'
5700 GOSUB 12986
CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
GET 1,1
MID$(MESSAGE.RECORD$,123,4) = " "
MID$(MESSAGE.RECORD$,123,4) = MID$(STR$(LAST.MESSAGE.READ),2)
PUT 1,1
GOSUB 12985
RETURN
'
' *****************************************************************************
' * V - COMMAND FROM MAIN MENU (VIEW CONFERENCES) *
' *****************************************************************************
'
5800 CALL QTPUT ("V)iew not implemented",1)
RETURN
'
' *****************************************************************************
' * DISPLAY TEXT FILES & SCAN DIRECTORIES *
' *****************************************************************************
'
6000 IF STOP.INTERRUPTS THEN _
A$ = "* <Ctrl K>/<Ctrl X> aborts <Ctrl S> suspends *" : _
GOSUB 12976
6020 CK = 0
GOTO 7100
6080 A$ = "Missing file " + FILE.NAME$ + ". Please tell SYSOP"
GOSUB 12979
RETURN
'
' *****************************************************************************
' * SCAN DIRECTORIES (PRINT TEXT) *
' *****************************************************************************
'
7000 A$ = "Scanning Directory " + _
FILE.NAME.HOLD$ + _
" for " + _
A1$
GOSUB 12979
PG = TRUE
7100 CALL OPENWORK (FILE.NAME$)
IF EC = 53 THEN _
CALL UPDTCALR ("Missing File " + FILE.NAME$,2) : _
GOTO 6080
7110 CALL CARRIER
IF EOF(2) OR _
(SUBROUTINE.PARAMETER AND NOT LOCAL.USER) THEN _
GOTO 7260
7130 LINE INPUT #2,A$
IF CK = 0 THEN _
GOTO 7250
7157 IF CK > 1 THEN _
Z$ = A$ : _
CALL ALLCAPS (Z$) : _
XXX = (INSTR(Z$,RS$) = 0) : _
GOTO 7190
7160 A = INSTR(9,MID$(A$,1,32),"/")
IF A = 0 THEN _
A = INSTR(9,MID$(A$,1,32),"-")
7162 IF A < 3 THEN _
GOTO 7110
IF INSTR("0123456789",MID$(A$,A-1,1)) = 0 THEN _
GOTO 7110
A = A - 2
WK$ = RIGHT$(MID$(A$,A,8),2) + _
LEFT$(MID$(A$,A,8),2) + _
MID$(MID$(A$,A,8),4,2)
IF MID$(WK$,3,1) = " " THEN _
MID$(WK$,3,1) = "0"
IF MID$(WK$,5,1) = " " THEN _
MID$(WK$,5,1) = "0"
7189 XXX = (WK$ < RS$)
7190 IF XXX THEN _
GOTO 7110
IF PG THEN _
PG = FALSE : _
CALL OPENWORK (FILE.NAME$) : _
Q = 0 : _
GOTO 7110
7200 IF PG THEN _
GOTO 7110
7250 GOSUB 12979
GOSUB 57110
IF NOT RET THEN _
GOTO 7110
7260 Q = 0
CLOSE 2
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
RETURN
'
' *****************************************************************************
' * FORMAT MESSAGE HEADER INFORMATION FOR DISPLAY *
' *****************************************************************************
'
8000 GOSUB 12979
IF RET THEN _
RETURN
8020 IF MID$(MESSAGE.RECORD$,37,5) = "ALL " THEN _
MESSAGE.TO$ = "ALL" : _
GOTO 8040
8030 MESSAGE.TO$ = MID$(MESSAGE.RECORD$,37,22)
MESSAGE.TO$ = LEFT$(MESSAGE.TO$ + SPACE$(2),INSTR(MESSAGE.TO$ +SPACE$(2),SPACE$(2))-1)
8040 SUBJECT$ = MID$(MESSAGE.RECORD$,76,25)
SUBJECT$ = LEFT$(SUBJECT$ + SPACE$(2),INSTR(SUBJECT$ +SPACE$(2),SPACE$(2))-1)
IF PASSWORD.FAILED THEN _
SUBJECT$ = SJ$
8050 MESSAGE.FROM$ = MID$(MESSAGE.RECORD$,6,31)
MESSAGE.FROM$ = LEFT$(MESSAGE.FROM$ + SPACE$(2),INSTR(MESSAGE.FROM$ +SPACE$(2),SPACE$(2))-1)
A$ = "Msg # " + _
LEFT$(MESSAGE.RECORD$,5) + _
" Dated " + _
MID$(MESSAGE.RECORD$,68,8) + _
" " + _
MID$(MESSAGE.RECORD$,59,8)
IF NOT RET THEN _
CALL QTPUT (A$,1): _
CALL QTPUT (" From: " + MESSAGE.FROM$,1) : _
CALL QTPUT (" To: " + MESSAGE.TO$,1) : _
A$ = " Re: " + SUBJECT$
IF NOT READ.MESSAGES THEN _
GOTO 8080
IF ADDRESSED.TO.USER THEN _
GOTO 8076
IF MESSAGE.TO$ = "ALL" THEN _
GOTO 8080
IF NOT SYSOP THEN _
GOTO 8080
IF INSTR(MESSAGE.TO$,"SYSOP") > 0 OR _
INSTR(MESSAGE.TO$,SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$) > 0 THEN _
GOTO 8076
GOTO 8080
8076 IF MID$(MESSAGE.RECORD$,123,6) = STRING$(6,0) OR _
MID$(MESSAGE.RECORD$,123,6) = SPACE$(6) THEN _
GOTO 8077
YY$= RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,126,1))),2)+ ":" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,127,1))),2)+ ":" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,128,1))),2)
FOR I = 1 TO 8
IF MID$(YY$,I,1) = " " THEN _
MID$(YY$,I,1) = "0"
NEXT
YY$ = YY$ + " on "
YY$ = YY$ + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,123,1))),2)+ "/" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,124,1))),2)+ "/" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,125,1))),2)
FOR I = 13 TO 20
IF MID$(YY$,I,1) = " " THEN _
MID$(YY$,I,1) = "0"
NEXT
A$ = A$ + " Last read at " + YY$
8077 YY$ = DATE$
WK$ = TIME$
MID$(MESSAGE.RECORD$,123,6) = CHR$(VAL(MID$(YY$,1,2))) + _
CHR$(VAL(MID$(YY$,4,2))) + _
CHR$(VAL(MID$(YY$,9,2))) + _
CHR$(VAL(MID$(WK$,1,2))) + _
CHR$(VAL(MID$(WK$,4,2))) + _
CHR$(VAL(MID$(WK$,7,2)))
GOSUB 12986
PUT 1,M(MESSAGE.DIM.INDEX,1)
GOSUB 12987
8080 GOSUB 12979
RETURN
'
' *****************************************************************************
' * UNCOMPRESS MESSAGE PRIOR TO DISPLAY *
' *****************************************************************************
'
9000 GOSUB 12979
FOR X = 2 TO VAL(MID$(MESSAGE.RECORD$,117,4))
GOSUB 12978
EOL = FALSE
J = 1
GET 1
9050 B = INSTR(J,MESSAGE.RECORD$,CHR$(227))
IF RET THEN _
RETURN
9060 C = B-J
IF C < 0 THEN _
C = 128 : _
EOL = TRUE
9070 A$ = MID$(MESSAGE.RECORD$,J,C)
IF EOL THEN _
GOTO 9090
9085 J = B + 1
CALL QTPUT (A$,1)
GOSUB 57110
GOTO 9050
9090 NEXT
A$ = ""
RETURN
'
' *****************************************************************************
' * C - COMMAND FROM UTILITY MENU (CLOCK - TIME ON SYSTEM) *
' *****************************************************************************
'
9100 GOSUB 12979
CALL GETIME
SUBROUTINE.PARAMETER = 2
CALL AMORPM
QX = ((HHH*60) + MMM + (SSS/60.0))*10.0
Q! = QX/10.0
CALL QTPUT("Now " + TIM$ + " Minutes on: " + STR$(Q!),1)
RETURN
'
' *****************************************************************************
' * DEFINE USER FILE RECORD VARIABLES TO COMPENSATE FOR THE BUG IN QUICKBASIC *
' * THAT REQUIRES A FIELD STATMENT TO BE EXECUTED WITHIN EACH SEPERATELY *
' * COMPILED PROGRAM -- EVEN THOUGH A FIELD STATEMENT WAS EXECUTED WHEN THE *
' * FILE WAS OPENED IN ANOTHER SEPERATELY COMPILED SUBROUTINE *
' *****************************************************************************
'
9450 FIELD 5,31 AS USER.NAME$, _
15 AS PASSWORD$, _
2 AS SECURITY.LEVEL$, _
14 AS USER.OPTIONS$, _
24 AS CITY.STATE$, _
19 AS MACHINE.TYPE$, _
14 AS LAST.DATE.TIME.ON$, _
3 AS LIST.NEW.DATE$, _
2 AS USER.DOWNLOADS$, _
2 AS USER.UPLOADS$, _
2 AS ELAPSED.TIME$
FIELD 5,128 AS USER.RECORD$
RETURN
'
' *****************************************************************************
' * GET USER DEFAULTS *
' *****************************************************************************
'
9500 USER.SECURITY.LEVEL = CVI(SECURITY.LEVEL$)
LAST.MESSAGE.READ = CVI(MID$(USER.OPTIONS$,3,2))
USER.TRANSFER.DEFAULT$ = MID$(USER.OPTIONS$,5,1)
GR = VAL(MID$(USER.OPTIONS$,6,1))
IF NOT EIGHT.BIT THEN _
GR = 0
USER.GRAPHIC.DEFAULT$ = MID$(" GC",GR + 1,-(GR > 0))
RIGHT.MARGIN = CVI(MID$(USER.OPTIONS$,7,2))
9510 USER.OPTIONS = CVI(MID$(USER.OPTIONS$,9,2))
PROMPT.BELL = (USER.OPTIONS AND 1) > 0
EXPERT.USER = (USER.OPTIONS AND 2) > 0
NULLS = (USER.OPTIONS AND 4) > 0
UPPER.CASE = (USER.OPTIONS AND 8) > 0
LINE.FEEDS = (USER.OPTIONS AND 16) > 0
CHECK.BULLETIN.LOGON = (USER.OPTIONS AND 32) > 0
SKIP.FILES.LOGON = (USER.OPTIONS AND 64) > 0
AUTODOWNLOAD.AVAILABLE = (USER.OPTIONS AND 128) > 0
REQ.QUES.ANSWERED = (USER.OPTIONS AND 256) > 0
GOSUB 11480
PAGE.LENGTH = ASC(MID$(USER.OPTIONS$,13,1))
9520 NUL$ = MID$(STRING$(5,0),1,-5*NULLS)
CALL SETCRLF
PASSWORD.SAVE$ = PASSWORD$
RETURN
'
' *****************************************************************************
' * B - COMMAND FROM MAIN MENU (READ BULLETINS) *
' *****************************************************************************
'
9700 IF ACTIVE.BULLETINS < 1 THEN _
A$ = "no bulletins today" : _
GOSUB 1397 : _
RETURN
IF Q > 1 THEN _
ANS.INDEX = 2: _
LAST.INDEX = Q: _
GOTO 9708
9705 FILE.NAME$ = BULLETIN.MENU$
GOSUB 1790
9707 GOSUB 41000
NON.STOP = FALSE
ANS.INDEX = 1
A$ = "Bulletin #(s) [1 thru" + STR$(ACTIVE.BULLETINS) + _
"], L)ist, N)ew"
CALL SKIPLINE (1)
GOSUB 12998
IF Q = 0 THEN _
RETURN
ANS.INDEX = 1
LAST.INDEX = Q
9708 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN 10595
CALL ALLCAPSD (B$(),ANS.INDEX)
ON INSTR("LN",B$(ANS.INDEX)) GOTO 9705,9760
9711 Z$ = MID$(STR$(VAL(B$(ANS.INDEX))),2)
IF VAL(Z$) > 0 AND VAL(Z$) <= ACTIVE.BULLETINS THEN _
GOTO 9720
GOTO 9725
9720 IF NOT LOCAL.USER THEN _
CALL UPDTCALR ("Read Bulletin " + Z$,1)
FILE.NAME$ = BULLETIN.PREFIX$ + Z$
CALL FINDIT (FILE.NAME$)
IF NOT OK THEN _
GOTO 9707
STOP.INTERRUPTS = TRUE
GOSUB 1790
STOP.INTERRUPTS = FALSE
CALL DISPLAYTR (TIME.REMAINING!)
9725 ANS.INDEX = ANS.INDEX + 1
IF ANS.INDEX <= LAST.INDEX THEN _
GOTO 9708
GOTO 9707
' *****************************************************************************
' * CHECK AND REVIEW NEW BULLETINS SINCE LAST LOGON *
' *****************************************************************************
9750 CALL CHKNEWBUL (PREV.LAST.ON$,NUM.NEW.BULLETS,NEW.BULLETS$)
CALL SKIPLINE (1)
A$ = STR$(NUM.NEW.BULLETS) + " NEW BULLETIN(S) since last call" + _
NEW.BULLETS$
GOSUB 12979
RETURN
9760 ' **** [entry when want review plus chance to read] *********
GOSUB 9750
IF NUM.NEW.BULLETS > 0 THEN _
LAST.INDEX = Q : _
A$ = "READ new bulletins (Y=[ENTER],N)" : _
GOSUB 12995 : _
IF NOT NO THEN _
ANS.INDEX = 2: _
GOTO 9708
IF ANS.INDEX < 1 THEN _
RETURN _
ELSE _
GOTO 9707
'
' *****************************************************************************
' * W - COMMAND FROM MAIN MENU (WHO'S ON THE OTHER NODES) *
' *****************************************************************************
'
9800 IF CONFERENCE.MODE THEN _
A$ = "Nodes won't display within a conference!" : _
GOSUB 12977 : _
RETURN
GOSUB 12979
CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
FOR NODE.INDEX = 2 TO NODES.IN.SYSTEM + 1
GET 1,NODE.INDEX
A$ = MID$(MESSAGE.RECORD$,1,31) + _
"Node" + _
STR$(NODE.INDEX - 1) + _
LEFT$(" in",1-2*(MID$(MESSAGE.RECORD$,57,1) <> "A")) + _
"active " + _
MID$(MESSAGE.RECORD$,60,4) + _
" Baud"
GOSUB 12979
NEXT
RETURN
'
' *****************************************************************************
' * 1 - COMMAND FROM SYSOP MENU (DISPLAY COMMENTS) *
' *****************************************************************************
'
10070 CALL MUSIC (7)
FILE.NAME$ = COMMENTS.FILE$
GOSUB 6000
RETURN
'
' *****************************************************************************
' * U - COMMAND FROM UTILITY MENU (DISPLAY USERS) *
' * 2 - COMMAND FROM SYSOP MENU (DISPLAY USERS) *
' *****************************************************************************
'
10090 CALL MUSIC (6)
A$ = "List - U)sers, R)ecent callers"
CALL SKIPLINE (1)
GOSUB 12998
IF Q = 0 THEN _
RETURN
CALL ALLCAPSD (B$(),1)
ON INSTR("UR",B$(1)) + 1 GOTO 10090,10096,57000
10096 GOSUB 12700
CALL OPENUSER
GOSUB 9450
STOP.INTERRUPTS = TRUE
NON.STOP = (PAGE.LENGTH < 1)
I = 1
10097 IF I > HIGHEST.USER.RECORD THEN GOTO 10099
GET 5,I
X$ = MID$(USER.RECORD$,START.HASH,LEN.HASH)
IF ASC(X$)=0 OR LEFT$(X$,3)=" " OR LEFT$(PASSWORD$,3)=" " THEN _
GOTO 10098
GOSUB 57110
CALL QTPUT (LEFT$(X$,36)+CITY.STATE$+LAST.DATE.TIME.ON$,1)
10098 I = I + 1
GOTO 10097
10099 A$ = ""
STOP.INTERRUPTS = FALSE
RETURN
'
' *****************************************************************************
' * 3 - COMMAND FROM SYSOP MENU (RECOVER MESSAGES) *
' *****************************************************************************
'
10390 A$ = "Recover Msg #"
GOSUB 12995
MESSAGE.TO.RECOVER = VAL(B$(1))
IF MESSAGE.TO.RECOVER < 1 THEN _
GOTO 12980
CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1, 128 AS MESSAGE.RECORD$
ACTION.FLAG = FALSE
CALL RECOVMSG (MESSAGE.TO.RECOVER,FIRST.MESSAGE.RECORD,ACTION.FLAG)
IF ACTION.FLAG THEN _
A$ = "Re-Loading Msg File" : _
GOSUB 12979 : _
GOSUB 1900
RETURN
'
' *****************************************************************************
' * 4 - COMMAND FROM SYSOP MENU (DELETE COMMENTS) *
' *****************************************************************************
'
10530 A$ = "Delete comments (Y/N)"
GOSUB 12995
IF YES THEN _
CLOSE 2 : _
IF SHARE.IT THEN _
OPEN COMMENTS.FILE$ FOR OUTPUT SHARED AS #2 _
ELSE OPEN "O",2,COMMENTS.FILE$
CLOSE 2
10550 RETURN 1200
'
' *****************************************************************************
' * TIME LIMIT EXCEEDED EXIT *
' *****************************************************************************
'
10553 A$ = MID$("SessionDaily",-7*LIMIT.DAILY.TIME+1,7) + _
" time limit exceeded"
CALL UPDTCALR (A$,1)
GOSUB 1397
'
' *****************************************************************************
' * Q - COMMAND FROM GLOBAL FUNCTIONS *
' *****************************************************************************
'
10560 CHAT.AVAILABLE = FALSE
GOSUB 9100
IF NOT SYSOP THEN _
QUESTIONNAIRE$ = "EPILOG.DEF" : _
GOSUB 11510
CALL QTPUT(FIRST.NAME$ + ", Thanks and please call again!",1)
IF BPS = -1 THEN _
CALL DELAYIT (1)
IF LOCAL.USER.MODE OR NOT LOCAL.USER THEN _
CALL UPDTCALR ("Logged off",1)
CALL MUSIC (4)
GOTO 10595
10570 IF TIME.REMAINING! > 1 AND NOT EXPERT.USER THEN _
A$ = "Disconnect the call (Y,N=[ENTER])":_
GOSUB 12995:_
IF NOT YES THEN _
RETURN
GOTO 10560
10590 CALL UPDTCALR ("Sleep Disconnect",1)
10595 CALL GETIME
GOSUB 13700
IF (SYSOP OR LOCAL.USER) AND MAIN.USER.FILE.INDEX = 0 THEN _
GOSUB 5700
IF MAIN.USER.FILE.INDEX < 1 THEN _
CLS : _
GOTO 13540
IF CONFERENCE.MODE THEN _
GOSUB 5380
SYSOP = FALSE
CALL UPDATEU
GOTO 13540
10620 CALL UPDTCALR(LG$(LOGON.ERROR.INDEX),2)
10621 IF ACTIVE.USER.NAME$ = "" THEN _
ACTIVE.USER.NAME$ = "NAME UNAVAILABLE"
Z$ = ACTIVE.USER.NAME$ + _
" on at " + _
CURRENT.DATE$ + _
", " + _
TIM$ + _
"** LOGON DENIED **, " + _
BAUD.PARITY$
NG$ = Z$ + SPACE$(128-LEN(Z$))
10698 CALL MUSIC (5)
A$ = "Access denied!"
GOSUB 12976
IF BPS = -1 THEN _
CALL DELAYIT (1)
GOTO 13545
'
' *****************************************************************************
' * M - COMMAND FROM UTILITY MENU (CHANGE MARGINS) *
' *****************************************************************************
'
10925 UTILITY.MARGIN.CHANGE = TRUE
GOSUB 3100
UTILITY.MARGIN.CHANGE = FALSE
RETURN
'
' *****************************************************************************
' * 7 - COMMAND FROM SYSOP MENU (EXIT TO DOS) *
' *****************************************************************************
'
10930 IF DOS.VERSION < 2 OR REQUIRED.RINGS = 0 THEN _
A$ = "Remote DOS unavailable" : _
RETURN
10932 IF LOCAL.USER AND NOT DEBUG THEN _
A$ = "Only for remote SYSOP's" : _
RETURN
CALL DOSEXIT
GOTO 31000
'
' *****************************************************************************
' * D - COMMAND FROM MAIN MENU (EXIT TO DOORS) *
' *****************************************************************************
'
10970 IF NOT DOORS.AVAILABLE OR REQUIRED.RINGS = 0 THEN _
A$ = "All doors locked!" : _
RETURN
IF CONFERENCE.MODE THEN _
A$ = "Cannot exit to a Door when in a Conference!" : _
RETURN
10973 FILE.NAME$ = MENU$(5)
GOSUB 43025
10974 A$ = "Open which door"
GOSUB 12998
IF Q = 0 THEN _
RETURN
Z$ = B$(1)
CALL WORDINFILE (FILE.NAME$,Z$,FOUND)
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN 10595
IF NOT FOUND THEN _
CALL QTPUT ("No such Door "+Z$,1): _
GOTO 10973
Z$ = Z$ + ".BAT"
10986 CALL FINDIT (Z$)
IF NOT OK THEN _
CALL UPDTCALR ("Door " + Z$ + " missing",2) : _
GOTO 10973
CALL DOOREXIT
'
' *****************************************************************************
' * 5 - COMMAND FROM SYSOP MENU (USER FILE MAINTENANCE) *
' *****************************************************************************
'
11000 TU = USER.FILE.INDEX
STOP.INTERRUPTS = TRUE
I = 1
SCAN.USERS = FALSE
A$ = "A)dd, L)st, P)rt, M)od, S)can users"
GOSUB 12998
11003 IF Q = 0 THEN _
GOTO 20093
QQ = 0
Z$ = LEFT$(B$(1),1)
CALL ALLCAPS (Z$)
IF Z$ = "A" THEN _
GOTO 12300 _
ELSE IF Z$ = "M" THEN _
STOP.INTERRUPTS = FALSE _
ELSE IF Z$ = "P" THEN _
QQ = TRUE _
ELSE IF Z$ = "S" THEN _
SCAN.USERS = TRUE : _
STOP.INTERRUPTS = FALSE _
ELSE IF Z$ <> "L" THEN _
GOTO 11000
11005 CALL OPENUSER
GOSUB 9450
Z = 1
IF SCAN.USERS THEN _
A$ = "Scan for N)ame, P)wd, C)ity/St, or L)evel" : _
GOSUB 12995 : _
SCAN.FUNCTION$ = LEFT$(B$(1),1) : _
CALL ALLCAPS (SCAN.FUNCTION$) : _
CR = 0 : _
GOSUB 12979 : _
GOSUB 12966 : _
GOTO 12962
11010 FOR J = Z TO HIGHEST.USER.RECORD
GET 5,J
11015 X$ = MID$(USER.RECORD$,START.HASH,LEN.HASH)
IF ASC(X$) = 0 OR LEFT$(X$,3) = " " THEN _
GOTO 11310
OF = CVI(SECURITY.LEVEL$)
A$ = RIGHT$(" "+STR$(LOC(5)),4) + _
":" + _
USER.NAME$ + _
"SECURITY" + _
RIGHT$(" "+STR$(OF),5) + _
" "
11020 A$ = A$ + _
"Password = " + _
PASSWORD$
11025 IF QQ THEN _
CALL PRINTIT (A$)
11027 GOSUB 12979
IF RET <> 0 THEN _
GOTO 11330
IF OF < MINIMUM.LOGON.SECURITY THEN _
A$ = " <Locked out> " : _
GOTO 11030
IF OF >= SYSOP.SECURITY.LEVEL THEN _
A$ = " (SYSOP) " : _
GOTO 11030
A$ = SPACE$(19)
11030 A$ = A$ + _
LAST.DATE.TIME.ON$ + _
" " + _
CITY.STATE$ + _
MACHINE.TYPE$
11100 IF QQ THEN _
CALL PRINTIT (A$)
11101 CALL QTPUT(A$,1)
IF RET <> 0 THEN _
GOTO 11330
A$ = " DOWNLOADS = " + _
RIGHT$(" "+STR$(CVI(USER.DOWNLOADS$)),5) + " " + _
"UPLOADS = " + _
RIGHT$(" "+STR$(CVI(USER.UPLOADS$)),5) + " " + _
" Times on ="
A$ = A$+RIGHT$(" "+STR$(CVI(MID$(USER.OPTIONS$,1,2))),5) + " " + _
"TIME USED = " + _
RIGHT$(" "+STR$(CVI(ELAPSED.TIME$)),5) + _
" Min"
IF QQ THEN _
CALL PRINTIT (A$)
11105 CALL QTPUT (A$,1)
IF RET <> 0 THEN _
GOTO 11330
IF NOT RESTRICT.BY.DATE THEN _
GOTO 11107
GOSUB 11480
A$ = "Subscription date = " + REG.DISPLAY.DATE$
IF QQ THEN _
CALL PRINTIT (A$)
CALL QTPUT (A$,1)
IF RET <> 0 THEN _
GOTO 11330
11107 IF STOP.INTERRUPTS THEN _
GOTO 11310
11110 CALL QTPUT ("D)elete, F)ind, M)enu, N)ew pwd, P)rint,",1)
A$ = "R)eset graphics, Q)uit, S)ecurity, #)user"
IF RESTRICT.BY.DATE THEN _
A$ = A$ + ", $)Reg Date"
GOSUB 12995
IF NOT SCAN.USERS AND Q = 0 THEN _
GOTO 11310
11115 Z$ = LEFT$(B$(1),1)
CALL ALLCAPS (Z$)
X = INSTR("DNPQFSMR$",Z$)
IF Z$ = "" AND SCAN.USERS THEN _
GOTO 12965
ON X GOTO 11130,11160,11220,11320,11340,11390,11330,11400,11450
11125 Z = VAL(B$)
IF Z < 1 OR Z > HIGHEST.USER.RECORD-1 THEN _
GOTO 11310
GOTO 11010
'
' *****************************************************************************
' * D - COMMAND FROM 5- USER MAINTENANCE OPTIONS (DELETE USER) *
' *****************************************************************************
'
11130 A$ = "Delete user (Y/N)"
GOSUB 12995
IF NO THEN _
GOTO 11290
LSET USER.NAME$ = CHR$(0)+"deleted user"
LSET SECURITY.LEVEL$ = MKI$(MINIMUM.LOGON.SECURITY -1)
LSET LAST.DATE.TIME.ON$ = "01/01/80" + " " + TIME.LOGGED.ON$
GOTO 11290
'
' *****************************************************************************
' * N - COMMAND FROM 5- USER MAINTENANCE OPTIONS (CHANGE USER PASSWORD) *
' *****************************************************************************
'
11160 GOSUB 12800
GOTO 11290
'
' *****************************************************************************
' * P - COMMAND FROM 5- USER MAINTENANCE OPTIONS (PRINT USER FILE) *
' *****************************************************************************
'
11220 QQ = NOT QQ
GOTO 11015
11290 USER.FILE.INDEX = LOC(5)
GOSUB 12989
PUT 5,USER.FILE.INDEX
GOSUB 12991
USER.FILE.INDEX = 0
GOTO 11015
11310 IF SCAN.USERS THEN _
GOTO 12965
11311 NEXT
'
' *****************************************************************************
' * Q - COMMAND FROM 5- USER MAINTENANCE OPTIONS (QUIT TO MAIN MENU) *
' *****************************************************************************
'
11320 CLOSE 5
USER.FILE.INDEX = TU
RETURN 1200
'
' *****************************************************************************
' * M - COMMAND FROM 5- USER MAINTENANCE OPTIONS (MAIN USER MAINT. MENU) *
' *****************************************************************************
'
11330 CLOSE 2
GOTO 11000
'
' *****************************************************************************
' * F - COMMAND FROM 5- USER MAINTENANCE OPTIONS (FIND USER) *
' *****************************************************************************
'
11340 A$ = PROMPT.HASH$+" to find"
CALL SKIPLINE (1)
GOSUB 12995
IF Q = 0 THEN _
GOTO 11340
TEMP.HASH.VALUE$ = B$(1)
IF LEN(TEMP.HASH.VALUE$) < 3 OR LEN(TEMP.HASH.VALUE$) > LEN.HASH THEN _
GOTO 11340
CALL ALLCAPS (TEMP.HASH.VALUE$)
IF START.INDIV < 1 THEN _
GOTO 11345
11342 A$ = PROMPT.INDIV$+" to find"
GOSUB 12995
IF Q = 0 THEN _
GOTO 11342
TEMP.INDIV.VALUE$ = B$(1)
IF LEN(TEMP.INDIV.VALUE$) < 3 OR LEN(TEMP.INDIV.VALUE$) > LEN.INDIV THEN _
GOTO 11342
CALL ALLCAPS (TEMP.INDIV.VALUE$)
11345 GOSUB 12600
GOSUB 12984
USER.FILE.INDEX = 0
IF FOUND THEN _
GOTO 11015
11380 A$ = TEMP.HASH.VALUE$ + " " + TEMP.INDIV.VALUE$ + " not found"
GOSUB 12977
GOTO 11310
'
' *****************************************************************************
' * S - COMMAND FROM 5- USER MAINTENANCE OPTIONS (CHANGE USER SECURITY) *
' *****************************************************************************
'
11390 GOSUB 11395
LSET SECURITY.LEVEL$ = MKI$(OF)
GOTO 11290
11395 A$ = "Enter security level"
GOSUB 12995
CALL ALLCAPSD (B$(),1)
Z$ = B$(1)
OF = VAL(Z$)
IF OF > USER.SECURITY.LEVEL THEN _
OF = USER.SECURITY.LEVEL
RETURN
'
' *****************************************************************************
' * R - COMMAND FROM 5- USER MAINTENANCE OPTIONS (RESET USER GRAPHICS) *
' *****************************************************************************
'
11400 LSET USER.OPTIONS$ = LEFT$(USER.OPTIONS$,5) + _
"0" + _
MID$(USER.OPTIONS$,7)
GOTO 11290
'
' *****************************************************************************
' * $ - COMMAND FROM 5 - USER MAINTENANCE (CHANGE SUBSCRIPTION DATE) *
' *****************************************************************************
'
11450 A$ = "Enter new subscription date"
GOSUB 12995
IF Q = 0 THEN _
GOTO 11015
DATE.HOLD$ = DATE$
11455 DATE$ = B$(1)
DATE$ = DATE.HOLD$
WORK.DATE$ = B$(1)
GOSUB 11470
LSET USER.OPTIONS$ = LEFT$(USER.OPTIONS$,10) + _
REG.DATE$ + _
MID$(USER.OPTIONS$,13)
GOSUB 11480
GOTO 11290
'
' *****************************************************************************
' * CALCULATE SUBSCRIPTION DATES *
' *****************************************************************************
'
11470 IF LEN(WORK.DATE$) < 10 THEN _
WORK.DATE$ = LEFT$(WORK.DATE$,6) + "19" + RIGHT$(WORK.DATE$,2)
TODAY.REG.YY = VAL(MID$(WORK.DATE$,7))
TODAY.REG.MM = VAL(LEFT$(WORK.DATE$,2))
TODAY.REG.DD = VAL(MID$(WORK.DATE$,4,2))
CALL TWOBYTEDATE (TODAY.REG.YY,TODAY.REG.MM,TODAY.REG.DD,REG.DATE$)
RETURN
11480 X$ = MID$(USER.OPTIONS$,11,2)
IF CVI(X$) <> 0 THEN _
REG.DATE$ = X$ : _
ELSE GOSUB 11482
CALL GETYMD (REG.DATE$,1,USER.REG.YY)
CALL GETYMD (REG.DATE$,2,USER.REG.MM)
CALL GETYMD (REG.DATE$,3,USER.REG.DD)
REG.DISPLAY.DATE$ = RIGHT$("00"+MID$(STR$(USER.REG.MM),2),2) + _
"/" + _
RIGHT$("00"+MID$(STR$(USER.REG.DD),2),2) + _
"/" + _
RIGHT$(STR$(USER.REG.YY),2)
IF CVI(X$) = 0 THEN _
REG.DISPLAY.DATE$ = "00/00/00"
RETURN
11482 WORK.DATE$ = DATE$
GOTO 11470
'
' *****************************************************************************
' * NEW USER SUBSCRIPTION OR SYSOP OPTION 8 (TEST SUBSCRIPTION SCRIPT) *
' *****************************************************************************
'
11510 FILE.NAME$ = LEFT$(WELCOME.FILE$,2) + QUESTIONNAIRE$
11520 CALL FINDIT (FILE.NAME$)
IF NOT OK THEN _
RETURN
REDIM A$(256)
CALL ASKUSERS
REDIM A$(ADIM)
IF SUBROUTINE.PARAMETER = - 1 THEN _
RETURN 10595
RETURN
'
' *****************************************************************************
' * A - COMMAND FROM 5- USER MAINTENANCE OPTIONS (ADD USER) *
' *****************************************************************************
'
12300 A1$ = ""
ATTEMPTS = 0
USER.SECURITY.LEVEL.SAVE = USER.SECURITY.LEVEL
FIRST.NAME.SAVE$ = FIRST.NAME$
LAST.NAME.SAVE$ = LAST.NAME$
ACTIVE.USER.NAME.SAVE$ = ACTIVE.USER.NAME$
CITY.STATE.SAVE$ = CI$
HASH.VALUE.SAVE$ = HASH.VALUE$
INDIV.VALUE.SAVE$ = INDIV.VALUE$
GOSUB 12500
GOSUB 12840
GOSUB 12850
GOSUB 12598
IF USER.FILE.INDEX = 0 THEN _
GOSUB 12984 : _
GOTO 12330
IF FOUND THEN _
PRINT "User already exists" : _
GOSUB 12984 : _
GOTO 12330
12310 GOSUB 12630
GOSUB 12800
GOSUB 11395
TEMP.SECURITY.LEVEL = OF
GOSUB 12900
LSET LAST.DATE.TIME.ON$ = CURRENT.DATE$ + _
" " + _
TIME.LOGGED.ON$
GOSUB 12960
CALL ALLCAPSD (B$(),1)
LSET CITY.STATE$ = B$(1)
LSET ELAPSED.TIME$ = MKI$(0)
IF START.HASH > 1 THEN _
MID$(USER.RECORD$,START.HASH,LEN.HASH) = HASH.VALUE$
IF START.INDIV > 1 THEN _
MID$(USER.RECORD$,START.INDIV,LEN.INDIV) = INDIV.VALUE$
PUT 5,USER.FILE.INDEX
12320 GOSUB 12991
12330 USER.SECURITY.LEVEL = USER.SECURITY.LEVEL.SAVE
FIRST.NAME$ = FIRST.NAME.SAVE$
LAST.NAME$ = LAST.NAME.SAVE$
ACTIVE.USER.NAME$ = ACTIVE.USER.NAME.SAVE$
CI$ = CITY.STATE.SAVE$
HASH.VALUE$ = HASH.VALUE.SAVE$
INDIV.VALUE$ = INDIV.VALUE.SAVE$
USER.FILE.INDEX = TU
GOTO 11000
'
' *****************************************************************************
' * GET USER FIRST AND LAST NAMES *
' *****************************************************************************
'
12500 IF ATTEMPTS > 5 THEN _
FF = TRUE : _
RETURN
12510 GOSUB 12700
ATTEMPTS = ATTEMPTS + 1
A$ = A1$ + "FIRST Name"
CALL SKIPLINE (1)
GOSUB 12995
IF Q = 0 THEN _
GOTO 12500
CALL ALLCAPSD (B$(),1)
Z$ = B$(1)
GOSUB 5100
FIRST.NAME$ = LEFT$(Z$ + SPACE$(2),INSTR(Z$ +SPACE$(2),SPACE$(2))-1)
IF Q <> 1 THEN _
CALL ALLCAPSD (B$(),2) : _
Z$ = B$(2) : _
GOTO 12540
12530 A$ = A1$ + "LAST Name"
GOSUB 12995
CALL ALLCAPSD (B$(),1)
Z$ = B$(1)
12540 GOSUB 5100
LAST.NAME$ =LEFT$(Z$ + SPACE$(2),INSTR(Z$ +SPACE$(2),SPACE$(2))-1)
IF LEN(LAST.NAME$) < 2 THEN _
IF LEN(FIRST.NAME$) > 2 THEN _
GOTO 12500
IF (LEN(FIRST.NAME$) + LEN(LAST.NAME$)) > 30 THEN _
GOTO 12500
IF USER.SECURITY.LEVEL.SAVE < SYSOP.SECURITY.LEVEL THEN _
IF (LEN(FIRST.NAME$) < 2 OR LEN(LAST.NAME$) < 2) THEN _
GOTO 12500 _
ELSE IF LEFT$(FIRST.NAME$,1)=" " OR LEFT$(LAST.NAME$,1)=" " THEN _
GOTO 12500
12550 ACTIVE.USER.NAME$ = MID$(FIRST.NAME$ + " " + LAST.NAME$,1,31)
Z$ = FIRST.NAME$
RETURN
'
' *****************************************************************************
' * CHECK FOR NAMES NOT ALLOWED *
' *****************************************************************************
'
12570 FOUND = FALSE
CALL OPENWORK (TRASHCAN.FILE$)
IF EC = 53 THEN _
GOTO 710
12580 IF EOF(2) THEN _
RETURN
INPUT #2,INVALID.NAME$
IF Z$ <> INVALID.NAME$ THEN _
GOTO 12580
FOUND = TRUE
RETURN
12595 CALL QTPUT ("Real name required. Call traced & recorded",1)
GOTO 10621
'
' *****************************************************************************
' * COMMON SEARCH USER FILE ROUTINE *
' *****************************************************************************
'
12598 TEMP.HASH.VALUE$ = HASH.VALUE$
TEMP.INDIV.VALUE$ = INDIV.VALUE$
12600 GOSUB 4910
GOSUB 12988
IF NOT PRIVATE.DOOR THEN _
CALL QTPUT ("Checking Users...",1)
12605 CALL OPENUSER
GOSUB 9450
CALL FINDUSER (TEMP.HASH.VALUE$,TEMP.INDIV.VALUE$,START.HASH,LEN.HASH,_
START.INDIV,LEN.INDIV,HIGHEST.USER.RECORD,FOUND,_
USER.FILE.INDEX,SL)
IF FOUND THEN _
RETURN
IF CURRENT.USER.COUNT < HIGHEST.USER.RECORD*.95 THEN _
RETURN
A$ = "No room for new users in " + GRN$
CALL UPDTCALR (A$,2)
IF REMEMBER.NEW.USERS AND NOT SURVIVE.NOUSER.ROOM THEN _
GOSUB 1397
USER.FILE.INDEX = 0
IF SURVIVE.NOUSER.ROOM THEN _
REMEMBER.NEW.USERS = FALSE
RETURN
' **********************************************************************
' * Augment user count, lock 4 rec block in user, unlock files *
' **********************************************************************
12630 GOSUB 23000
CURRENT.USER.COUNT = CURRENT.USER.COUNT+(SL = 0)*REMEMBER.NEW.USERS
12632 GOSUB 24000
GOSUB 12987
IF REMEMBER.NEW.USERS THEN _
GOSUB 12989
GOSUB 12990
RETURN
'
' *****************************************************************************
' * INFORM USER OF WHAT CONFERENCE USER FILE HE IS VIEWING *
' *****************************************************************************
'
12700 IF CONFERENCE.MODE THEN _
A$ = "Users of " + GRN$ + ":" : _
GOSUB 12979
RETURN
'
' *****************************************************************************
' * GET PASSWORD FROM NEWUSER *
' *****************************************************************************
'
12800 A$ = "Enter PASSWORD you'll use to logon again"
GOSUB 12995
IF USER.SECURITY.LEVEL.SAVE < SYSOP.SECURITY.LEVEL THEN _
IF B$(1) = SPACE$(LEN(B$(1))) THEN _
GOTO 12800
IF LEN(B$(1)) > 15 THEN _
CALL QTPUT ("15 Char. Max",1) : _
GOTO 12800
CALL ALLCAPSD (B$(),1)
Z$ = B$(1)
LSET PASSWORD$ = Z$
RETURN
'
' *****************************************************************************
' * GET HASH VALUE FOR CURRENT USER TO LOOK UP IN THE USER'S FILE *
' *****************************************************************************
'
12840 IF START.HASH = 1 THEN _
HASH.VALUE$ = ACTIVE.USER.NAME$:_
RETURN
X$ = A1$ + PROMPT.HASH$
CALL UNTILRIGHT (X$,HASH.VALUE$,2,LEN.HASH)
RETURN
'
' *****************************************************************************
' * GET FIELD TO INDIVIDUATE ONE USER FROM ANOTHER (NAME FIELD IS DEFAULT) *
' *****************************************************************************
'
12850 IF START.INDIV < 1 THEN _
RETURN
IF START.INDIV = 1 THEN _
INDIV.VALUE$ = ACTIVE.USER.NAME$ : _
RETURN
X$ = A1$ + PROMPT.INDIV$
CALL UNTILRIGHT (X$,INDIV.VALUE$,2,LEN.INDIV)
RETURN
'
' *****************************************************************************
' * ALWAYS RECORD THE HASH/INDIVIDUATING FIELD TO EACH RECORD LOGGED OUT *
' *****************************************************************************
'
12860 X$ = "{" + HASH.VALUE$ + "/" + INDIV.VALUE$ + "}"
IF LEN(Z$) < 65 THEN _
X = 65 _
ELSE X = LEN(Z$) + 2
MID$(NG$,X) = X$
RETURN
'
' *****************************************************************************
' * SET NEWUSER DEFAULTS *
' *****************************************************************************
'
12900 LSET USER.NAME$ = ACTIVE.USER.NAME$
LSET USER.OPTIONS$ = MKI$(0) + _
MKI$(0) + _
" 0" + _
MKI$(64) + _
MKI$(16) + _
MKI$(0) + _
CHR$(23) + _
STRING$(1,0)
LSET USER.DOWNLOADS$ = MKI$(0)
LSET USER.UPLOADS$ = MKI$(0)
LSET SECURITY.LEVEL$ = MKI$(TEMP.SECURITY.LEVEL)
LSET ELAPSED.TIME$ = MKI$(0)
RETURN
' *****************************************************************************
' * GET CITY AND STATE FROM NEWUSER *
' *****************************************************************************
'
12960 A$ = A1$ + "CITY and STATE"
GOSUB 12995
IF Q = 0 THEN _
GOTO 12960
IF B$(1) = SPACE$(LEN(B$(1))) THEN _
GOTO 12960
CALL ALLCAPSD (B$(),1)
LSET CITY.STATE$ = B$(1)
CI$ = B$(1) + SPACE$(2)
RETURN
'
' *****************************************************************************
' * S - COMMAND FROM 5 - USER MAINTENANCE OPTIONS (SCAN USERS) *
' *****************************************************************************
'
12962 X = 0
FF = FALSE
A$ = "String to search"
GOSUB 12998
IF Q = 0 THEN _
GOTO 11000
CALL ALLCAPSD (B$(),1)
WK$ = B$(1)
IF SCAN.FUNCTION$ = "L" THEN _
WK$ = ","+STR$(VAL(WK$))+","
12963 GET 5,I
GOSUB 12966
X = INSTR(SCAN.FIELD$,WK$)
IF X > 0 THEN _
GOTO 11015
12965 I = I + 1
IF I > HIGHEST.USER.RECORD-1 THEN _
GOTO 11000
X = 0
GOTO 12963
12966 FF = INSTR("NCPL",SCAN.FUNCTION$)
12967 ON FF GOTO 12968,12969,12970,12972
GOTO 11000
'
' *****************************************************************************
' * N - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR NAME) *
' *****************************************************************************
'
12968 SCAN.FIELD$ = USER.NAME$
RETURN
'
' *****************************************************************************
' * C - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR CITY/ST) *
' *****************************************************************************
'
12969 SCAN.FIELD$ = CITY.STATE$
RETURN
'
' *****************************************************************************
' * P - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR PASSWORD)*
' *****************************************************************************
'
12970 SCAN.FIELD$ = PASSWORD$
RETURN
'
' *****************************************************************************
' * L - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR LEVEL) *
' *****************************************************************************
'
12972 SCAN.FIELD$ = ","+STR$(CVI(SECURITY.LEVEL$))+","
RETURN
'
' *****************************************************************************
' * CALLS INTO SEPEARATELY COMPILED SUBROUTINES (RBBS-SUB) *
' *****************************************************************************
'
'
' *****************************************************************************
' * STANDARD ENTRY FOR RBBS-PC'S COMMON TERMINAL OUTPUT ROUTINE *
' *****************************************************************************
'
12975 SUBROUTINE.PARAMETER = 1
GOTO 12981
12976 SUBROUTINE.PARAMETER = 2
GOTO 12981
12977 SUBROUTINE.PARAMETER = 3
GOTO 12981
12978 SUBROUTINE.PARAMETER = 4
GOTO 12981
12979 SUBROUTINE.PARAMETER = 5
GOTO 12981
12980 SUBROUTINE.PARAMETER = 6
12981 IF USER.DATA THEN _
PRINT A$ : _
RETURN
CALL TPUT
12983 IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF FUNCTION.KEY <>0 THEN _
GOSUB 60010 : _
SUBROUTINE.PARAMETER = 7 : _
FUNCTION.KEY = 0 : _
GOTO 12981
IF SUBROUTINE.PARAMETER = 8 THEN _
GOSUB 12995
RETURN
'
' *****************************************************************************
' * STANDARD ENTRY FOR RBBS-PC'S FILE LOCKING WHEN RUNNING MULTIPLE RBBS-PC'S *
' *****************************************************************************
'
12984 SUBROUTINE.PARAMETER = 1
GOTO 12994
12985 SUBROUTINE.PARAMETER = 2
GOTO 12994
12986 SUBROUTINE.PARAMETER = 3
GOTO 12994
12987 SUBROUTINE.PARAMETER = 4
GOTO 12994
12988 SUBROUTINE.PARAMETER = 5
GOTO 12994
12989 SUBROUTINE.PARAMETER = 6
GOTO 12994
12990 SUBROUTINE.PARAMETER = 7
GOTO 12994
12991 SUBROUTINE.PARAMETER = 8
GOTO 12994
12992 SUBROUTINE.PARAMETER = 9
GOTO 12994
12993 SUBROUTINE.PARAMETER = 10
12994 CALL FILELOCK
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 31000
RETURN
'
' *****************************************************************************
' * STANDARD ENTRY FOR RBBS-PC'S COMMON TERMINAL INPUT ROUTINE *
' *****************************************************************************
'
12995 SUBROUTINE.PARAMETER = 1
12996 CALL TGET
12997 IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF FUNCTION.KEY <>0 THEN _
GOSUB 60010 : _
SUBROUTINE.PARAMETER = 2 : _
FUNCTION.KEY = 0 : _
GOTO 12996
RETURN
12998 A$ = A$ + PRESS.ENTER$
GOTO 12995
'
' *****************************************************************************
' * MAIN SYSTEM ERROR TRAP - ALL ERRORS PASS THROUGH THIS ROUTINE *
' *****************************************************************************
'
13000 IF DEBUG THEN _
A$ = "RBBS-PC DEBUG Error Trap Entry ERL=" + _
STR$(ERL) + _
" ERR=" + _
STR$(ERR) : _
IF PRINTER THEN _
LPRINT A$ _
ELSE PRINT A$
IF ERR = 0 AND ERL = 210 THEN _
PRINT "Fatal comm port error" : _
GOTO 31000
IF ERR = 0 THEN _
GOTO 13540
IF ERR = 7 THEN _
GOTO 13650
13010 IF ERL = 110 THEN _
CALLERS.FILE.INDEX = 0 : _
RESUME 112
13033 IF ERL = 821 AND ERR = 5 THEN _
RESUME 832
13035 IF ERL = 1905 AND ERR = 63 THEN _
CLOSE 1 : _
KILL ACTIVE.MESSAGE.FILE$ : _
RESUME 5350
13038 IF ERL = 4371 AND ERR = 6 THEN _
RESUME 1200
13045 IF ERL = 5130 AND ERR = 63 THEN _
RESUME 5160
13047 IF ERL = 5151 AND ERR = 62 THEN _
RESUME 5160
IF ERL = 11455 THEN _
CALL QTPUT ("New subscription date invalid!",1) : _
RESUME 11450
13087 IF ERL = 20242 AND ERR = 62 THEN _
RESUME 20247
13090 IF ERR = 58 THEN _
GOTO 13190
13100 CALL FINDTIME (TI!)
IF (ERR = EC AND (TI! - TKA! < 5)) THEN _
EA = EA + 1 : _
IF EA > 10 THEN _
GOTO 13800
13120 EC = ERR
CALL FINDTIME (TI!)
IF TI! - TKA! > 5 THEN _
EA = 0 _
ELSE CALL FINDTIME(TKA!)
13190 IF ERL = 20840 OR _
ERL = 21281 OR _
ERL = 21360 OR _
ERL = 21420 THEN _
SUBROUTINE.PARAMETER = 1 : _
CALL DELAYIT (1) : _
CALL CARRIER : _
IF SUBROUTINE.PARAMETER THEN _
RESUME 10595
13225 IF ERL = 4740 THEN _
RESUME 4745
13260 IF ERL = 7110 THEN _
RESUME 6080
13270 IF ERL = 7130 AND ERR = 52 THEN _
RESUME 7260
IF ERL = 20262 THEN _
RESUME 20263
IF ERL = 21480 THEN _
CALL LOGERROR : _
IF ERR=57 THEN _
CALL QTPUT("Error reading file. Aborting download",1):_
DOWNLOAD.COMPLETED = FALSE :_
RESUME 21230
13390 IF ERL = 20452 AND ERR = 53 THEN _
RESUME 20451
IF ERL = 20560 AND ERR = 67 THEN _
RESUME 20451
IF ERL = 20452 THEN _
A$ = "Unable to delete file. ERROR"+STR$(ERR):_
GOSUB 12979:_
RESUME 20453
13395 IF ERL = 20560 AND ERR = 70 THEN _
IF VAL(FREE.SPACE$) > 1999 THEN _
RESUME 20451 _
ELSE GOSUB 13417 : _
RESUME 5160
13396 IF ERL = 20610 AND ERR = 57 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 20610
13400 IF ERL = 20620 THEN _
RESUME 20670
13405 IF ERL = 20736 AND ERR = 53 THEN _
RESUME 5160
13410 IF ERL = 20840 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 20840
13415 IF ERL = 20900 AND ERR = 70 THEN _
GOSUB 13417 : _
RESUME 21230
IF ERL = 20900 AND ERR = 75 THEN _
RESUME 21230
GOTO 13420
13417 CALL QTPUT ("No room for uploads. Try tomorrow.",1)
RETURN
13420 IF ERL = 21131 THEN _
RESUME 21230
13430 IF ERL = 21281 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 21281
13440 IF ERL = 21360 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 21360
13442 IF ERL = 21420 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 21420
13447 IF ERL = 53101 THEN _
IF ERR = 53 OR ERR = 64 OR ERR = 68 THEN _
RESUME 5160
13450 IF 65535! = ERL THEN _
GOTO 13800
13460 IF ERR = 5 OR ERR = 6 THEN _
GOTO 10595
13470 IF ERR = 57 OR ERR = 24 OR ERR = 25 THEN _
CALL DELAYIT (1) : _
CALL CARRIER : _
IF SUBROUTINE.PARAMETER THEN _
RESUME 10595
13480 IF ERR = 61 OR EC = 61 THEN _
A$ = "* Disk full - terminating *" : _
GOSUB 12976 : _
GOSUB 33090 : _
GOTO 31005
13490 IF ERR = 71 THEN _
GOSUB 13630 : _
RESUME 1205
13500 CALL LOGERROR
' print "untrapped error";str$(err);" on ";str$(erl)
CALL QTPUT (CALLERS.RECORD$,1)
RESUME 1200
'
' *****************************************************************************
' * COMMON EXIT FROM RBBS-PC (I.E. "ABANDON ALL HOPE OH YE WHO ENTER HERE") *
' *****************************************************************************
'
13540 IF LOCAL.USER THEN _
IF NOT LOCAL.USER.MODE THEN _
GOTO 13549
13543 IF NOT SYSOP THEN _
IF (USER.FILE.INDEX = 0 AND REMEMBER.NEW.USERS) OR _
NEW.USER = TRUE THEN _
GOTO 13549
13545 CALL UPDATEC
13549 GOSUB 13700
GOSUB 13555
GOSUB 12986
CALL OPENMSG
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360
FIELD 1,128 AS MESSAGE.RECORD$
GET 1,NODE.RECORD.INDEX
EXIT.TO.DOORS = FALSE
MID$(MESSAGE.RECORD$,57,1) = "I"
MID$(MESSAGE.RECORD$,40,2) = STR$(EXIT.TO.DOORS)
PUT 1,NODE.RECORD.INDEX
GOSUB 12985
13550 CLOSE 1,2,5
CALL CARRIER
IF NOT SUBROUTINE.PARAMETER THEN _
OUT MODEM.CONTROL.REGISTER,INP(MODEM.CONTROL.REGISTER AND 254) : _
CALL DELAYIT (DTR.DROP.DELAY)
13552 IF NOT LOCAL.USER THEN _
CALL MODEMPUT (MODEM.GO.OFFHOOK.COMMAND$)
13553 CLOSE 1,2,3,4,5
IF RECYCLE.TO.DOS THEN _
GOTO 31005
RUN 100
13555 IF LOCAL.USER THEN _
RETURN
13560 CALL DELAYIT (3)
OUT MODEM.CONTROL.REGISTER,INP(MODEM.CONTROL.REGISTER) AND 254
CALL DELAYIT (DTR.DROP.DELAY)
OUT MODEM.CONTROL.REGISTER,INP(MODEM.CONTROL.REGISTER) OR 1
RETURN
13600 CLS
LOCATE ,,0
PRINT DF$;" file not found/invalid. Run CONFIG."
CALL DELAYIT (3)
GOTO 31000
13630 CALL QTPUT("File Menu missing",1)
RETURN
13650 CLS
LOCATE ,,0
PRINT "Not enough memory for RBBS"
CALL DELAYIT (3)
GOTO 31000
13700 IF MESSAGE.FILE.LOCK THEN _
GOSUB 12987
13710 IF USER.FILE.LOCK THEN _
GOSUB 12990
13720 IF USER.BLOCK.LOCK THEN _
GOSUB 12991
RETURN
'
' *****************************************************************************
' * FATAL ERROR HAS OCCURED! RECYCLE SYSTEM IMMEDIATELY *
' *****************************************************************************
'
13800 A$ = "Fatal error!"
GOSUB 12979
GOTO 10595
'
' *****************************************************************************
' * TAKE THE PHONE OFF THE HOOK FOR LOCAL SYSOP MAINTENANCE *
' *****************************************************************************
'
14498 CLOSE 3
OPEN COM.PORT$ + ":" + MODEM.INIT.BAUD$ + ",N,8,1,RS,CD,DS" AS #3
14500 CALL MODEMPUT (MODEM.GO.OFFHOOK.COMMAND$)
RETURN
'
' *****************************************************************************
' * C/R - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (QUIT TO MAIN MENU)*
' *****************************************************************************
'
20093 IF USER.FILE.INDEX > 0 THEN _
CALL OPENUSER : _
GOSUB 9450 : _
GET 5,USER.FILE.INDEX : _
GOSUB 9500
20095 RETURN 1200
'
' *****************************************************************************
' * V - COMMAND FROM FILES MENU (VIEW ARC CONTENTS) *
' *****************************************************************************
'
20140 IF Q > 1 THEN _
B = 2 : _
GOTO 20142
20141 A$ = "Enter ARCed file(s) to list"
GOSUB 12995
B = 1
IF Q = 0 THEN _
RETURN
20142 LAST.ARC = Q
FIRST.ARC = B
VIOLATION$ = "View ARC"
FOR ARC.INDEX = FIRST.ARC TO LAST.ARC
GOSUB 20143
NEXT
RETURN
20143 Z$ = B$(ARC.INDEX)
CALL ALLCAPS (Z$)
CALL BRKFNAME (Z$,DRV$,PREFIX$,EXT$,FALSE)
IF EXT$ = "" THEN _
Z$ = Z$ + ".ARC"_
ELSE_
IF EXT$ <> "ARC" THEN _
CALL QTPUT ("Only .ARC files can be viewed",1) : _
RETURN
FILE.NAME.HOLD$ = Z$
FILE.NAME$ = Z$
CALL BADFILE (FILE.NAME$,BAD.FILE.NAME.INDEX)
ON BAD.FILE.NAME.INDEX GOTO 20144,20146,20147
20144 CALL ROTORSDIR (FILE.NAME$,SUBDIR$(),SUBDIR.COUNT+(NOT SYSOP))
IF OK THEN _
GOTO 20148
20146 Z$ = B$(ARC.INDEX) + " not found!"
CALL UPDTCALR (Z$,2)
A$ = Z$ + " Type correct filename ([Enter] Quits)"
GOSUB 12995
IF Q = 0 THEN _
RETURN
B$(ARC.INDEX) = B$(1)
GOTO 20143
20147 GOSUB 1380
GOTO 20146
20148 CALL QTPUT(FILE.NAME.HOLD$ + " contains the following files.",1)
CALL VIEWARC
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 13540
RETURN
'
' *****************************************************************************
' * L - COMMAND FROM FILES MENU (LIST DIRECTORY) *
' *****************************************************************************
'
20150 LIST.DIRECTORY = TRUE
SEARCH.DATE$ = ""
SEARCH.STRING$ = ""
CK = 0
IF Q > 1 THEN _
LIST.INDEX = 2:_
GOTO 20160
LIST.INDEX = 1
CALL GETDIRS ("for menu")
IF Q = 0 THEN _
Q = 1 : _
B$(Q) = DIRECTORY.EXTENTION$
20160 CALL CONVDIRS (LIST.INDEX)
QX = Q
20161 IF LIST.INDEX > QX THEN _
IF NO OR (FILE.NAME.HOLD$=DIRECTORY.EXTENTION$) THEN _
REDIM A$(ADIM) : _
REDIM B$(ADIM) : _
RETURN _
ELSE X$ = B$(LIST.INDEX-1) :_
A$="End list. R)elist, [Q]uit, or file(s) to download" :_
GOSUB 12995 : _
CALL ALLCAPSD (B$(),1) : _
IF B$(1)="R" THEN _
LIST.INDEX = LIST.INDEX - 1 : _
B$(LIST.INDEX) = X$ _
ELSE IF LEN(B$(1)) > 1 AND _
USER.SECURITY.LEVEL => OPT.SEC(18) THEN _
B = 1 : _
GOSUB 20202 : _
RETURN _
ELSE RETURN
IF INSTR(B$(LIST.INDEX),".") THEN _
GOTO 20172
VIOLATION$ = "List Dir. "
Z$ = B$(LIST.INDEX)
CALL ALLCAPS(Z$)
FILE.NAME.HOLD$ = Z$
IF Z$ = DIRECTORY.EXTENTION$ THEN _
GOTO 20164
FOR I = 2 TO QX
A$(I) = B$(I)
NEXT
CALL FMS (Z$,SEARCH.STRING$,SEARCH.DATE$,IN.FMS, _
CATEGORY.NAME$(),CATEGORY.CODE$(),CATEGORY.DESC$(),_
DOWNLOAD.FLAG,CAT.FOUND)
WHILE DOWNLOAD.FLAG > 0 AND SUBROUTINE.PARAMETER > -1
B = 1
GOSUB 20202
X$ = CATEGORY.CODE$(CAT.FOUND)
CALL DISUPDIR (X$,SEARCH.STRING$,SEARCH.DATE$,DOWNLOAD.FLAG)
GOSUB 41000
CALL CARRIER
WEND
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN 10595
FOR I = 2 TO QX
B$(I) = A$(I)
NEXT
IF IN.FMS THEN _
GOTO 20175
IF USER.SECURITY.LEVEL < MIN.SEC.TO.VIEW THEN _
IF FILE.NAME.HOLD$ = UPLOAD.DIR.CHECK$ THEN _
FILE.NAME.HOLD$ = "of uploads" : _
GOTO 20172
FILE.NAME.HOLD$ = B$(LIST.INDEX)
IF LIMIT.SEARCH.TO.FMS THEN _
GOTO 20172
IF FILE.NAME.HOLD$ = "ALL" OR FILE.NAME.HOLD$ = "A" THEN _
DIR.INDEX = LIST.INDEX : _
GOTO 53070
CALL BADFILE (FILE.NAME.HOLD$,BAD.FILE.NAME.INDEX)
ON BAD.FILE.NAME.INDEX GOTO 20163,20172,20176
20163 FILE.NAME$ = FILE.NAME.HOLD$
CALL BADNAME
ON BAD.FILE.NAME.INDEX GOTO 20164,20176
20164 IF FILE.NAME$ = UPLOAD.DIR.CHECK$ AND _
USER.SECURITY.LEVEL >= MIN.SEC.TO.VIEW THEN _
FILE.NAME$ = UPLOAD.PATH$ _
ELSE FILE.NAME$ = DIRECTORY.PATH$
FILE.NAME$ = FILE.NAME$ + _
FILE.NAME.HOLD$ + _
"." + _
DIRECTORY.EXTENTION$
GOSUB 43030
20165 CALL FINDIT (FILE.NAME$)
IF NOT OK THEN _
GOTO 20172
20167 B$(0) = B$(LIST.INDEX)
IF LIST.NEW THEN _
GOSUB 7000 : _
IF NO THEN _
QX = LIST.INDEX : _
GOTO 20170 _
ELSE GOTO 20170
CALL BUFFILE(FILE.NAME$)
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
20170 B$(LIST.INDEX) = B$(0)
GOTO 20175
20172 A$ = "Directory " + FILE.NAME.HOLD$ + " not found!"
GOSUB 12977
NO = TRUE
20175 LIST.INDEX = LIST.INDEX + 1
GOTO 20161
20176 GOSUB 1380
GOTO 20172
'
' *****************************************************************************
' * D - COMMAND FROM FILES MENU (SEARCH FOR FILE TO DOWNLOAD) *
' *****************************************************************************
20180 IF Q > 1 THEN _
B = 2 : _
GOTO 20202
20200 A$ = "Name file(s) to " + _
LEFT$("AUTO",-4*AUTODOWNLOAD.AVAILABLE) + "download"
GOSUB 12995
B = 1
IF Q = 0 THEN _
RETURN
20202 LAST.DOWNLOAD = Q
FIRST.DOWNLOAD = B
COMMAND.TRANSFER$ = ""
IF AUTODOWNLOAD.AVAILABLE THEN _
COMMAND.TRANSFER$ = "X"
AUTODOWNLOAD.IN.PROGRESS = AUTODOWNLOAD.AVAILABLE
IF LAST.DOWNLOAD > FIRST.DOWNLOAD THEN _
Z$ = B$(LAST.DOWNLOAD) : _
CALL ALLCAPS(Z$) : _
IF LEN (Z$) = 1 AND INSTR("AXCKYIGW",Z$) > 0 THEN _
LAST.DOWNLOAD = LAST.DOWNLOAD - 1 : _
COMMAND.TRANSFER$ = Z$ : _
AUTODOWNLOAD.IN.PROGRESS = FALSE
START.DRIVE = 1
IF LAST.DOWNLOAD > FIRST.DOWNLOAD THEN _
START.DRIVE = VAL(B$(FIRST.DOWNLOAD + 1)) : _
IF START.DRIVE < 1 THEN _
START.DRIVE = 1
FOR DWN.INDEX = FIRST.DOWNLOAD TO LAST.DOWNLOAD
GOSUB 20205
20203 NEXT
COMMAND.TRANSFER$ = ""
RETURN
20205 CALL QTPUT ("Searching for file...",1)
FILE.NAME.HOLD$ = B$(DWN.INDEX)
FILE.NAME$ = FILE.NAME.HOLD$
VIOLATION$ = "Download "
CALL BADFILE (FILE.NAME$,BAD.FILE.NAME.INDEX)
ON BAD.FILE.NAME.INDEX GOTO 20220,20231,20233
20220 CALL ROTORSDIR (FILE.NAME$,SUBDIR$(),SUBDIR.COUNT + _
((USER.SECURITY.LEVEL < MIN.SEC.TO.VIEW) OR _
NOT CAN.DOWNLOAD.FROM.UP))
20225 IF OK THEN _
GOTO 20235
20231 A$ = FILE.NAME.HOLD$ + " not found!"
CALL UPDTCALR (A$,2)
IF AUTODOWNLOAD.IN.PROGRESS THEN _
A$ = A$ + " during AUTODOWNLOAD" : _
GOSUB 12977 : _
RETURN
A$ = A$ + " Correct name ([ENTER] quits)"
GOSUB 12995
IF Q=0 THEN _
RETURN
B$(DWN.INDEX) = B$(1)
GOTO 20205
20233 GOSUB 1380
GOTO 20231
20235 CALL BADNAME
ON BAD.FILE.NAME.INDEX GOTO 20236,20245
20236 LINE.25$ = "(D) " + Z$
IF AUTODOWNLOAD.IN.PROGRESS THEN _
MID$(LINE.25$,2,1)="A"
'
' *****************************************************************************
' * TEST FOR DOWNLOAD SECURITY *
' *****************************************************************************
'
CALL OPENWORK (FILESEC.FILE$)
IF EC = 53 THEN _
CALL UPDTCALR ("Missing file " + FILESEC.FILE$,2) : _
GOTO 20247
CALL BRKFNAME (Z$,YY$,A1$,RS$,FALSE)
20242 IF EOF(2) THEN _
GOTO 20247 _
ELSE INPUT #2,N$,FILE.SECURITY,FILE.PASSWORD$ : _
CALL BRKFNAME (N$,DR$,X$,EXTENTION$,FALSE)
20243 IF DR$ <> "" AND DR$ <> YY$ THEN _
GOTO 20242
CALL WILDCARD (X$,A1$)
IF NOT OK THEN _
GOTO 20242
CALL WILDCARD (EXTENTION$,RS$)
IF NOT OK THEN _
GOTO 20242
20244 IF USER.SECURITY.LEVEL < FILE.SECURITY THEN _
GOTO 20245
IF FILE.PASSWORD$ = "" THEN _
GOTO 20247
CALL ALLCAPS (FILE.PASSWORD$)
IF FILE.PASSWORD$ = PASSWORD$ THEN _
GOTO 20247
A$ = "Enter PASSWORD to download " + FILE.NAME$
GOSUB 12995
IF Q = 0 THEN _
RETURN
CALL ALLCAPSD (B$(),1)
IF B$(1) = FILE.PASSWORD$ THEN _
GOTO 20247
20245 VIOLATION$ = "DownLoad " + FILE.NAME$
20246 GOSUB 1380
RETURN
20247 DF = 0
CALL BRKFNAME (FILE.NAME$,DR$,X$,EXTENTION$,FALSE)
IF AUTODOWNLOAD.IN.PROGRESS THEN _
A$ = "Transferring -- " + B$(DWN.INDEX) : _
GOSUB 12977
IF EXTENTION$ = "" OR RELIABLE.MODE THEN _
GOTO 20248
IF INSTR(".WRK.FW .ARC.EXE.COM.OBJ.WKS.LBR",EXTENTION$) OR _
MID$(EXTENTION$,2,1) = "Q" OR _
(REQUIRE.NON.ASCII AND EXTENTION$ = "BAS") THEN _
CALL QTPUT ("Non-ASCII required for "+FILE.NAME.HOLD$,1) : _
DF = TRUE
20248 A$ = ""
GOSUB 21620
IF FF THEN _
GOTO 20260
GOSUB 21600
20260 TRANSFER.FUNCTION = 1
ON FF GOTO 20340, _ ' ASCII FILE DOWNLOAD
20290, _ ' XMODEM (CHECKSUM) FILE DOWNLOAD
20290, _ ' XMODEM (CRC-16) FILE DOWNLOAD
20265, _ ' KERMIT FILE DOWNLOAD
20261, _ ' YMODEM FILE DOWNLOAD
20261, _ ' IMODEM FILE DOWNLOAD
20261, _ ' YMODEMG FILE DOWNLOAD
20261, _ ' WXMODEM FILE DOWNLOAD
57120 ' NO FILE DOWNLOAD
'
' *****************************************************************************
' * QMXFER PROTOCOL DOWNLOADS/UPLOADS *
' *****************************************************************************
'
20261 IF NOT EIGHT.BIT THEN _
A$ = "Please SWITCH to N,8,1 for binary transfer" : _
GOSUB 12975 : _
CALL DELAYIT (3) : _
GOSUB 20992
IF FF = 5 OR _
FF > 6 THEN _
BLOCK.SIZE = 8 _
ELSE BLOCK.SIZE = 1
IF TRANSFER.FUNCTION = 1 THEN _
GOSUB 20750 : _
CLOSE 2
IF AUTODOWNLOAD.IN.PROGRESS THEN _
CALL SENDNAME : _
IF ABORT THEN _
DOWNLOAD.COMPLETED = FALSE : _
GOSUB 50600 : _
RETURN
CALL TRANSFER
20262 OPEN "I",2,"XFER-" + RIGHT$(NODE.ID$,1) + ".DEF"
INPUT #2,A$
INPUT #2,A$
INPUT #2,A$
INPUT #2,A$
IF TRANSFER.FUNCTION = 2 THEN _
IF LEFT$(A$,1) = "S" THEN _
GOTO 20700 _
ELSE GOTO 20730
IF TRANSFER.FUNCTION = 1 THEN _
IF LEFT$(A$,1) = "S" THEN _
DOWNLOAD.COMPLETED = TRUE _
ELSE DOWNLOAD.COMPLETED = FALSE
GOSUB 50600
RETURN
'
' *****************************************************************************
' * DOWNLOAD ABORT *
' *****************************************************************************
'
20263 A$ = "<Download aborted>"
DOWNLOAD.COMPLETED = FALSE
GOTO 20390
'
' *****************************************************************************
' * KERMIT INTERFACE FOR DOWNLOADS & UPLOADS *
' *****************************************************************************
'
20265 IF TRANSFER.FUNCTION = 1 THEN _
BLOCK.SIZE = 1 : _
GOSUB 20750
20266 CLOSE 2
CALL TRANSFER
IF TRANSFER.FUNCTION = 2 THEN _
GOTO 20700
DOWNLOAD.COMPLETED = TRUE
GOSUB 50600
RETURN
'
' *****************************************************************************
' * GET DRIVE ID AND FILENAME EXTENTION *
' *****************************************************************************
'
20285 OK = FALSE
K = 0
L = LEN(A$)
20286 K = K + 1
IF K > L THEN _
GOTO 20288
B$ = MID$(Z$,K,1)
IF B$ = "*" THEN _
RETURN
20287 IF B$ <> "?" AND MID$(A$,K,1) <> B$ THEN _
OK = TRUE : _
RETURN
GOTO 20286
20288 IF L < LEN(Z$) AND MID$(Z$,L + 1,1) <> "*" THEN _
OK = TRUE
RETURN
'
' *****************************************************************************
' * XMODEM DOWNLOAD DRIVER *
' *****************************************************************************
'
20290 BLOCK.SIZE = 1
IF USE.EXTERNAL.XMODEM THEN _
GOTO 20261
GOSUB 20750
A1$ = "SEND"
GOSUB 20320
IF AUTODOWNLOAD.IN.PROGRESS THEN _
CALL SENDNAME : _
IF ABORT THEN _
RETURN 20792
GOSUB 21300
A$ = ""
GOTO 20390
20320 IF NOT EIGHT.BIT THEN _
A$ = "Please SWITCH to N,8,1 for binary transfer" : _
GOSUB 12975 : _
CALL DELAYIT (3)
20325 XMODEM.TYPE$ = " ": _
NEGATIVE.ACKNOWLEDGE$ = CHR$(21): _
SOL = 132
IF FT$ = "C" THEN _
NEGATIVE.ACKNOWLEDGE$ = FT$: _
SOL = 133: _
XMODEM.TYPE$ = "/CRC "
20330 IF AUTODOWNLOAD.IN.PROGRESS THEN _
RETURN
A$ = "XMODEM" + _
XMODEM.TYPE$ + _
A1$ + _
" of " + _
FILE.NAME.HOLD$ + _
" ready. <Ctrl X> aborts"
GOSUB 12979
RETURN
'
' *****************************************************************************
' * ASCII DOWNLOAD DRIVER *
' *****************************************************************************
'
20340 IF DF THEN _
A$ = "Switch to a non-ascii protocol" : _
GOSUB 12979 : _
RETURN
CALL OPENWORK (FILE.NAME$)
BLOCK.SIZE = 1
GOSUB 20760
A$ = "* <Ctrl X> aborts <Ctrl S> suspends *"
GOSUB 12977
A$ = "ASCII SEND of " + _
FILE.NAME.HOLD$ + _
" ready. Press [ENTER] to start"
GOSUB 12995
20380 STOP.INTERRUPTS = TRUE
TU = 0
SWAP TU,PAGE.LENGTH
CALL BUFFILE (FILE.NAME$)
SWAP TU,PAGE.LENGTH
NON.STOP = (PAGE.LENGTH > 0) 'IS THIS CORRECT?
IF STOP.FILE THEN _
DOWNLOAD.COMPLETED = FALSE : _
GOTO 20390
20381 A$ = CHR$(26)
GOSUB 12977
CALL CARRIER
IF NOT LOCAL.USER AND SUBROUTINE.PARAMETER = 0 THEN _
FOR X = 1 TO 5 : _
PRINT #3,CHR$(7) : _
CALL DELAYIT (3) : _
NEXT
20385 DOWNLOAD.COMPLETED = TRUE
20390 GOSUB 12977
GOTO 50600
'
' *****************************************************************************
' * U - COMMAND FROM FILES MENU (UPLOAD) *
' *****************************************************************************
'
20395 GOSUB 12977
A$ = "Correct name of file to upload"
GOSUB 12995
IF Q = 0 THEN _
RETURN
B$(ANS.INDEX) = B$(1)
GOTO 20435
20400 CALL TIMEREMAIN (TIME.REMAINING!)
Q! = TCA!
FIRST.UPLOAD = 1
IF Q > 1 THEN _
FIRST.UPLOAD = 2 : _
GOTO 20430
20420 A$ = "Name file(s) to upload"
GOSUB 12995
IF Q = 0 THEN _
RETURN
'
' *****************************************************************************
' * SEARCH FOR DUPLICATE FILENAME *
' *****************************************************************************
'
20430 LAST.UPLOAD = Q
Z$ = B$(LAST.UPLOAD)
IF LEN(Z$) = 1 THEN _
CALL ALLCAPS (Z$): _
IF INSTR("AXCKYIGW ",Z$) > 0 THEN _
LAST.UPLOAD = LAST.UPLOAD - 1:_
COMMAND.TRANSFER$ = Z$
FOR ANS.INDEX = FIRST.UPLOAD TO LAST.UPLOAD
GOSUB 20435
NEXT
COMMAND.TRANSFER$ = ""
RETURN
20435 CALL QTPUT ("Searching for file...",1)
FILE.NAME.HOLD$ = B$(ANS.INDEX)
CALL ALLCAPS(FILE.NAME.HOLD$)
FILE.NAME$ = FILE.NAME.HOLD$
VIOLATION$ = "Upload "
IF INSTR(FILE.NAME$,":") OR _
INSTR(FILE.NAME$,"\") OR _
INSTR(FILE.NAME$,"/") THEN _
GOTO 20451
CALL BADFILE (FILE.NAME$,BAD.FILE.NAME.INDEX)
ON BAD.FILE.NAME.INDEX GOTO 20440,20451,20515
20440 CALL ROTORSDIR (FILE.NAME$,SUBDIR$(),SUBDIR.COUNT)
20450 IF OK THEN _
GOTO 20452
GOTO 20475
20451 A$ = "Invalid file name"
GOTO 20395
20452 IF USER.SECURITY.LEVEL >= OVERWRITE.SECURITY.LEVEL THEN _
A$ = "Overwrite file" : _
GOSUB 12995 : _
IF YES THEN _
Z$ = FILE.NAME$ : _
CLOSE 2 : _
KILL FILE.NAME$ : _
GOTO 20475
20453 CLOSE 2
A$ = FILE.NAME.HOLD$ + " exists! Please use a new name"
GOTO 20395
20475 Z$ = UPLOAD.DRIVE.FILE$
GOSUB 12977
CALL FINDFREE
IF VAL(FREE.SPACE$) < 4096 THEN _
GOSUB 13417: _
ANS.INDEX = LAST.UPLOAD + 1:_
RETURN
A$ = "Upload disk has" + FREE.SPACE$
GOSUB 12977
LINE.25$ = "(U) " + FILE.NAME.HOLD$
SUBROUTINE.PARAMETER = 2
CALL LINE25
A$ = ""
OK = TRUE
20477 GOSUB 21620
IF FF THEN _
GOTO 20500
GOSUB 21600
20500 TRANSFER.FUNCTION = 2
ON FF GOTO 20560, _ ' ASCII FILE UPLOAD
20540, _ ' XMODEM (CHECKSUM) FILE UPLOAD
20540, _ ' XMODEM (CRC-16) FILE UPLOAD
20265, _ ' KERMIT FILE UPLOAD
20261, _ ' YMODEM FILE UPLOAD
20261, _ ' IMODEM FILE UPLOAD
20261, _ ' YMODEMG FILE UPLOAD
20261, _ ' WXMODEM FILE UPLOAD
20735 ' NO FILE UPLOAD
20510 IF SNOOP THEN _
PRINT "<Esc> by SYSOP aborts"
RETURN
20515 GOSUB 1380
RETURN 20420
'
' *****************************************************************************
' * XMODEM UPLOAD DRIVER *
' *****************************************************************************
'
20540 IF USE.EXTERNAL.XMODEM THEN _
GOTO 20261
A1$ = "RECEIVE"
GOSUB 20320
OK = TRUE
GOSUB 20860
IF OK THEN _
GOTO 20700
GOTO 20730
'
' *****************************************************************************
' * ASCII UPLOAD *
' *****************************************************************************
'
20560 CALL QTPUT("Transfer MUST end with a <Ctrl-K>",1)
CALL QTPUT("ASCII RECEIVE of " + FILE.NAME.HOLD$ + " ready",1)
OK = FALSE
XOFF = FALSE
CLOSE 2
OPEN "O",2,FILE.NAME$
GOSUB 20510
20600 WHILE NOT EOF(3)
CALL CARRIER
IF SUBROUTINE.PARAMETER THEN _
GOTO 10595
IF LOF(3) < 512 THEN _
PRINT #3,XOFF$; : _
XOFF = TRUE
20610 X$ = INPUT$(LOC(3),3)
IF INSTR(X$,CHR$(11)) THEN _
GOTO 20650
OK = TRUE
20620 PRINT #2,X$;
IF SNOOP THEN _
PRINT X$;
20621 GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
GOTO 20745
IF NOT OK THEN _
GOTO 20670
20630 WEND
CALL CARRIER
IF SUBROUTINE.PARAMETER THEN _
GOTO 10595
IF XOFF THEN _
XOFF = FALSE : _
PRINT #3,XON$;
GOTO 20600
20650 X = INSTR(X$,CHR$(11))
IF X <> 1 THEN _
PRINT #2,LEFT$(X$,X-1) _
ELSE IF NOT OK THEN _
GOTO 20730
GOTO 20700
20670 A$ = XOFF$ + "System error! Upload aborted <Ctrl-K> continues"
20675 GOSUB 12979
CALL DELAYIT (3)
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,XON$;
20680 WHILE NOT EOF(3)
X$ = INPUT$(LOC(3),3)
IF INSTR(X$,CHR$(11)) THEN _
GOTO 20730
20685 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
WEND
GOTO 20680
'
' *****************************************************************************
' * UPDATE UPLOAD DIRECTORY *
' *****************************************************************************
'
20700 CALL UPDTUPLOAD (CATEGORY.NAME$(),CATEGORY.CODE$())
IF BYTES.IN.FILE# > 0.0 THEN _
GOTO 50610
20730 CALL QTPUT ("Upload aborted",1)
20735 CLOSE 2
20736 KILL FILE.NAME$
RETURN
'
' *****************************************************************************
' * SYSOP ABORTED UPLOAD *
' *****************************************************************************
'
20745 A$ = XOFF$ + "SYSOP aborted upload. Stop tranfer. <Ctrl-K> continues"
GOTO 20675
'
' *****************************************************************************
' * CALCULATE DOWNLOAD TIME ESTIMATE *
' *****************************************************************************
'
20750 CLOSE 2
IF SHARE.IT THEN _
OPEN FILE.NAME$ FOR RANDOM SHARED AS #2 _
ELSE OPEN "R",2,FILE.NAME$,128
20760 BYTES.IN.FILE# = LOF(2)
IX# = FIX(BYTES.IN.FILE# / 128)
BLOCKS.IN.FILE# = BYTES.IN.FILE# / 128
IF IX# <> BLOCKS.IN.FILE# THEN _
BLOCKS.IN.FILE# = BLOCKS.IN.FILE# + 1
20780 A$ = "FILE SIZE: "
IF FF = 4 OR FF = 8 THEN _
GOTO 20785
A$ = A$ + STR$(INT((BLOCKS.IN.FILE# / BLOCK.SIZE)+.5) + (-1*(FF>4))) + _
" blocks "
20785 A$ = A$ + STR$(BYTES.IN.FILE#) + " bytes"
GOSUB 12979
TLA = VAL(MID$("139165165165165142135165",3*FF-2,3))
BLOCKS.IN.FILE# = BLOCKS.IN.FILE# * _
TLA / _
VAL(MID$("00030045120240480960",-3*BPS,3))
IF BYTES.IN.FILE# < 1 THEN _
RETURN 20792
20790 SUBROUTINE.PARAMETER = 2
CALL LINE25
A$ = "Transfer time:" + _
STR$(INT(BLOCKS.IN.FILE# / 60)) + " min," + _
STR$(INT(BLOCKS.IN.FILE#-(INT(BLOCKS.IN.FILE#/60)*60))) + _
" sec"
GOSUB 12979
GOSUB 41000
IF (INT(BLOCKS.IN.FILE# / 60) + 1) > INT(TIME.REMAINING!) THEN _
A$ = "Not enough time left!" : _
CALL UPDTCALR (FILE.NAME$ + " " + A$,2) :_
CALL QTPUT (A$,1): _
A$ = "" : _
RETURN 20792
20792 RETURN
20810 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
Y$ = ""
CALL FINDTIME(DELAY!)
DELAY! = DELAY! + 2
20840 IF NOT EOF(3) THEN _
Y$ = INPUT$(LOC(3),3) : _
RETURN
20850 CALL CHECKTIM (DELAY!)
ON SUBROUTINE.PARAMETER GOTO 20840,20851
20851 Y$ = ""
RETURN
'
' *****************************************************************************
' * XMODEM UPLOAD *
' *****************************************************************************
'
20860 GOSUB 20992
IF NOT EIGHT.BIT THEN _
GOSUB 21280
20900 X$ = ""
SEC = 1
CLOSE 2
OPEN "R",2,FILE.NAME$,128
FIELD 2,128 AS Z$
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,NEGATIVE.ACKNOWLEDGE$;
CALL FINDTIME (TRANSFER.ABORT!)
TRANSFER.ABORT! = TRANSFER.ABORT! + WAIT.BEFORE.DISCONNECT
20920 FOR X = 1 TO 5
GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
GOTO 21270
GOSUB 20810
20930 IF LEFT$(Y$,1) = START.OF.HEADER$ THEN _
GOTO 21020
20940 IF LEFT$(Y$,1) = END.TRANSMISSION$ THEN _
GOTO 21220
20950 IF LEFT$(Y$,1) = CANCEL$ THEN _
GOTO 21230
20960 IF Y$ <> "" THEN _
GOSUB 21280 : _
CALL CHECKTIM (TRANSFER.ABORT!) : _
ON SUBROUTINE.PARAMETER GOTO 20920,21230
20970 NEXT
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,NEGATIVE.ACKNOWLEDGE$;
IF SNOOP THEN _
PRINT "Upload Timeout"
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 20990,21230
20990 GOTO 20920
'
' *****************************************************************************
' * CHANGE TO 8 BIT FOR XMODEM *
' *****************************************************************************
'
20992 GOSUB 20510
IF NOT EIGHT.BIT THEN _
CALL DELAYIT (3) : _
OUT LINE.CONTROL.REGISTER,3
20996 SO = 0
RETURN
'
' *****************************************************************************
' * XMODEM UPLOAD *
' *****************************************************************************
'
21000 GOSUB 20810
IF Y$ = "" THEN _
PRINT "Upload Timeout" : _
GOTO 21040
21020 X$ = X$ + Y$
IF LEN(X$) < SOL THEN _
GOTO 21000
21040 IF LEN(X$) = SOL THEN _
GOTO 21090
21050 IF LEN(X$) > SOL THEN _
GOTO 21180
21060 IF X$ = END.TRANSMISSION$ THEN _
GOTO 21220
21070 IF X$ = CANCEL$ THEN _
GOTO 21230
21080 GOTO 21170
21090 IF SEC <> ASC(MID$(X$,2,1)) THEN _
GOTO 21200
21100 IF (SEC XOR 255) <> ASC(MID$(X$,3,1)) THEN _
GOTO 21210
21110 IF FT$ = "X" THEN _
WK$ = MID$(X$,4,128): _
GOSUB 46000 _
ELSE WK$ = MID$(X$,4): _
GOSUB 46000
21112 IF FT$ = "X" THEN _
IF XMODEM.CHECKSUM <> ASC(MID$(X$,132,1)) THEN _
GOTO 21190 _
ELSE GOTO 21120
21113 IF CRC.VALUE <> 0 THEN _
GOTO 21191
21120 SO = SO + 1
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,ACKNOWLEDGE$;
21131 LSET Z$ = MID$(X$,4)
PUT 2
21145 SEC = 255 AND (SEC + 1)
IF SNOOP THEN _
LOCATE ,1 : _
PRINT "OK Rec Blk #";SO;
21150 X$=""
XMODEM.CHECKSUM = 0
CALL FINDTIME(TRANSFER.ABORT!)
TRANSFER.ABORT! = TRANSFER.ABORT! + 30
GOTO 20920
21170 A$ = "Short Blk #"
GOTO 21212
21180 A$ = "Long Blk #"
GOTO 21212
21190 A$ = "Chksum Error #"
GOTO 21212
21191 A$="CRC Error": _
GOTO 21212
21200 A$ = "Blk # Error in #"
IF SEC-1 <> ASC(MID$(X$,2,1)) THEN _
GOTO 21212
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,ACKNOWLEDGE$;
GOTO 21150
21210 A$ = "Complement Error in #"
21212 CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,NEGATIVE.ACKNOWLEDGE$;
IF SNOOP THEN _
PRINT LINE.FEED$;A$;SO + 1
GOTO 21150
21220 IF SNOOP THEN _
PRINT LINE.FEED$;"File Closed"
21225 CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,ACKNOWLEDGE$;
GOTO 21250
21230 IF SNOOP THEN _
PRINT LINE.FEED$;"Transfer Aborted"
21240 OK = FALSE
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,CANCEL$;CANCEL$;
21250 EIGHT.BIT = TRUE
RETURN
21270 GOSUB 20510
GOSUB 21280
GOTO 21230
'
' *****************************************************************************
' * CLEAR GARBAGE OUT OF COMMUNICATIONS BUFFER *
' *****************************************************************************
'
21280 IF EOF(3) THEN _
RETURN
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
21281 DF$ = INPUT$(LOC(3),3)
GOTO 21280
RETURN
'
' *****************************************************************************
' * XMODEM DOWNLOAD *
' *****************************************************************************
'
21300 GOSUB 20992
SEC = 0
GOSUB 21280
FIELD 2,128 AS X$
NEGATIVE.ACKNOWLEDGE$=CHR$(21)
CALL FINDTIME (TRANSFER.ABORT!)
TRANSFER.ABORT! = TRANSFER.ABORT! + WAIT.BEFORE.DISCONNECT
21350 WHILE NOT EOF(3)
21360 Y$ = INPUT$(1,3)
IF Y$ = CANCEL$ THEN _
GOTO 21560
21380 IF Y$ = NEGATIVE.ACKNOWLEDGE$ THEN _
FF = 3: _
FT$ = "X": _
GOTO 21480 _
ELSE IF Y$ = "C" THEN _
FF = 4: _
FT$ = "C": _
GOTO 21480
21390 WEND
GOSUB 21460
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 21350,21455
21410 CALL FINDTIME (TI!)
TRANSFER.ABORT! = TI! + WAIT.BEFORE.DISCONNECT
21415 WHILE NOT EOF(3)
21420 Y$ = INPUT$(1,3)
IF Y$ = ACKNOWLEDGE$ THEN _
GOTO 21470
21440 IF Y$ <> NEGATIVE.ACKNOWLEDGE$ THEN _
GOTO 21450
21443 IF SNOOP THEN _
PRINT LINE.FEED$;"Error -> retrans #";SO
21445 SO = SO-1
GOTO 21490
21450 IF Y$ = CANCEL$ THEN _
GOTO 21560
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 21451,21455
21451 WEND
GOSUB 21460
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 21410,21455
21455 IF SNOOP THEN _
PRINT "Download timeout"
GOTO 21560
21460 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
RETURN 21540
RETURN
21470 IF SNOOP THEN _
LOCATE ,1 : PRINT "OK Sent Blk #";SO;
21480 IF LOC(2) < LOF(2) / 128 THEN _
GET 2,(LOC(2) + 1) : _
SEC = 255 AND (SEC + 1) : _
GOTO 21490
21485 GOTO 21530
21490 SO = SO + 1
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,START.OF.HEADER$; CHR$(SEC); CHR$(SEC XOR 255);X$;
21503 WK$=X$
21504 GOSUB 46000
21510 CALL CARRIER
IF FT$ = "X" AND SUBROUTINE.PARAMETER = 0 THEN _
PRINT#3,CHR$(XMODEM.CHECKSUM); _
ELSE IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT#3,CHR$(CRC.HIGH);CHR$(CRC.LOW);
GOSUB 21280
GOTO 21410
'
' *****************************************************************************
' * END-OF-FILE FOR XMODEM DOWNLOADS -- SEND THE "EOT" CHARACTER AND WAIT UP *
' * TO 2 SECONDS FOR A POSITIVE RESPONSE (I.E. AN "ACK"). IF NONE IS *
' * RE-TRY UP TO 10 TIMES. IF NO POSITIVE RESPONSE IS RECEIVED AFTER TEN *
' * ATTEMPTS, ASSUME THE DOWNLOAD WAS UNSUCCESSFULL. *
' *****************************************************************************
'
21530 CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,END.TRANSMISSION$;
FOR X = 1 TO 10
GOSUB 20810
IF INSTR(Y$,ACKNOWLEDGE$) THEN _
GOTO 21550
GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
GOTO 21540
21535 NEXT
DOWNLOAD.COMPLETED = FALSE
GOTO 21230
21540 GOSUB 20510
21545 Y$ = CANCEL$
CALL CARRIER
IF SUBROUTINE.PARAMETER = 0 THEN _
PRINT #3,CANCEL$;CANCEL$;
DOWNLOAD.COMPLETED = FALSE
GOTO 21250
21550 DOWNLOAD.COMPLETED = TRUE
GOTO 21250
21560 DOWNLOAD.COMPLETED = FALSE
IF SNOOP THEN _
PRINT LINE.FEED$;"Caller aborted trans"
GOTO 21545
'
' *****************************************************************************
' * MANUAL SELECT OF TRANSFER PROTOCOL *
' *****************************************************************************
'
21600 CR = 0
A$ = A$ + "Protocol:"
GOSUB 12975
A$ = TRANSFER.OPTIONS$
GOSUB 12995
IF Q = 0 THEN _
GOTO 21600
Z$ = B$(1)
'
' *****************************************************************************
' * DEFAULT SELECT OF TRANSFER PROTOCOL *
' *****************************************************************************
'
21610 CALL ALLCAPS (Z$)
FF = INSTR("AXCKYIGWN",Z$)
IF FF < 1 THEN _
GOTO 21600
IF FF = 4 AND NOT KERMIT.SUPPORT THEN _
GOTO 21600
IF (FF > 4 AND FF < 8) AND NOT XFER.SUPPORT THEN _
GOTO 21600
IF FF = 6 AND NOT RELIABLE.MODE THEN _
GOTO 21600
IF FF = 7 AND NOT RELIABLE.MODE THEN _
GOTO 21600
IF FF = 8 AND NOT WXMODEM.SUPPORT THEN _
GOTO 21600
FT$ = MID$("AXCKYIGW ",FF,1)
RETURN
21620 FF = -1
IF COMMAND.TRANSFER$ <> "" THEN _
Z$ = COMMAND.TRANSFER$ : _
GOTO 21610
IF USER.TRANSFER.DEFAULT$ > " " THEN _
Z$ = USER.TRANSFER.DEFAULT$ : _
GOTO 21610
FF = 0
RETURN
'
' *****************************************************************************
' * GET MESSAGE HEADER RECORD DATA *
' *****************************************************************************
'
23000 GET 1,1
HIGH.MESSAGE.NUMBER = VAL(LEFT$(MESSAGE.RECORD$,8))
CALLS.TODATE! = VAL(MID$(MESSAGE.RECORD$,11,10))
CURRENT.USER.COUNT = VAL(MID$(MESSAGE.RECORD$,57,5))
HIGHEST.USER.RECORD = VAL(MID$(MESSAGE.RECORD$,62,5))
FIRST.MESSAGE.RECORD = VAL(MID$(MESSAGE.RECORD$,68,7))
NEXT.MESSAGE.RECORD = VAL(MID$(MESSAGE.RECORD$,75,7))
HIGHEST.MESSAGE.RECORD = VAL(MID$(MESSAGE.RECORD$,82,7))
NODES.IN.SYSTEM = VAL(MID$(MESSAGE.RECORD$,127))
IF NOT SYSOP AND NOT LOCAL.USER THEN _
RETURN
IF TEMP.SYSOP OR LOCAL.USER.MODE THEN _
RETURN
IF LAST.MESSAGE.READ < VAL(MID$(MESSAGE.RECORD$,123,4)) THEN _
LAST.MESSAGE.READ = VAL(MID$(MESSAGE.RECORD$,123,4))
LAST.MESSAGE.READ = - LAST.MESSAGE.READ * _
(LAST.MESSAGE.READ <= HIGH.MESSAGE.NUMBER)
RETURN
'
'
' *****************************************************************************
' * UPDATE MESSAGE HEADER RECORD DATA *
' *****************************************************************************
'
24000 MID$(MESSAGE.RECORD$,1,8) = STR$(HIGH.MESSAGE.NUMBER)
MID$(MESSAGE.RECORD$,11,10) = STR$(CALLS.TODATE!)
MID$(MESSAGE.RECORD$,57,5) = STR$(CURRENT.USER.COUNT)
MID$(MESSAGE.RECORD$,62,5) = STR$(HIGHEST.USER.RECORD)
MID$(MESSAGE.RECORD$,68,7) = STR$(FIRST.MESSAGE.RECORD)
MID$(MESSAGE.RECORD$,75,7) = STR$(NEXT.MESSAGE.RECORD)
MID$(MESSAGE.RECORD$,82,7) = STR$(HIGHEST.MESSAGE.RECORD)
PUT 1,1
RETURN
'
' *****************************************************************************
' * F1 - COMMAND FROM LOCAL KEYBOARD (IMMEDIATE EXIT TO DOS) *
' *****************************************************************************
'
31000 FILE.NAME$ = LEFT$(CALLERS.FILE$,2) + _
"RBBS" + _
MID$("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ", _
VAL(NODE.ID$),1) + _
"F1.DEF"
CLOSE 2
OPEN "O",2,FILE.NAME$
PRINT #2,MID$(FILE.NAME$,3,7)
GOSUB 14498
IF EXIT.TO.DOORS THEN _
SYSTEM
31005 CALL MLINIT (3)
SYSTEM
'
' *****************************************************************************
' * F2 - COMMAND FROM LOCAL KEYBOARD (SYSOP EXIT TO DOS AND RETURN) *
' *****************************************************************************
'
32000 IF NOT LOCAL.USER THEN _
CALL QTPUT("Sysop exiting to DOS. Please wait...",1) : _
FUNCTION.KEY = 0 : _
CALL DELAYIT (3)
SHELL DISK.FOR.DOS$+"COMMAND"
CLS
IF NOT LOCAL.USER THEN _
CALL CARRIER : _
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595 _
ELSE SUBROUTINE.PARAMETER = 2 : _
CALL LINE25 : _
CALL QTPUT ("Sysop back from DOS. Returning control to you.",2)
RETURN
'
' *****************************************************************************
' * F3 - COMMAND FROM LOCAL KEYBOARD (PRINTER TOGGLE) *
' *****************************************************************************
'
33000 PRINTER = NOT PRINTER
CHANGE.VALUE = PRINTER
FIELD.POSITION = 38
GOTO 33950
'
' *****************************************************************************
' * F4 - COMMAND FROM LOCAL KEYBOARD (SYSOP ANNOY) *
' *****************************************************************************
'
33040 SYSOP.ANNOY = NOT SYSOP.ANNOY
CHANGE.VALUE = SYSOP.ANNOY
FIELD.POSITION = 34
GOTO 33950
'
' *****************************************************************************
' * F5 - COMMAND FROM LOCAL KEYBOARD (FORCE CALLER ONLINE) *
' *****************************************************************************
'
33060 FUNCTION.KEY = 0
SUBROUTINE.PARAMETER = 4
RETURN 200
'
' *****************************************************************************
' * F6 - COMMAND FROM LOCAL KEYBOARD (SYSOP AVAILABLE TOGGLE) *
' * 6 - COMMAND FROM SYSOP MENU (SYSOP AVAILABLE TOGGLE) *
' *****************************************************************************
'
33070 SYSOP.AVAILABLE = NOT SYSOP.AVAILABLE
CHANGE.VALUE = SYSOP.AVAILABLE
FIELD.POSITION = 32
GOTO 33950
'
' *****************************************************************************
' * F7 - COMMAND FROM LOCAL KEYBOARD (SYSOP GETS SYSTEM NEXT) *
' *****************************************************************************
'
33090 IF ERR=61 AND NOT DISKFULL.GO.OFFLINE THEN _
RETURN
SYSOP.NEXT = NOT SYSOP.NEXT
CHANGE.VALUE = SYSOP.NEXT
FIELD.POSITION = 36
GOTO 33950
'
' *****************************************************************************
' * F8 - COMMAND FROM LOCAL KEYBOARD (ASSIGN USER TEMPORARY SYSOP SECURITY) *
' *****************************************************************************
'
33110 SYSOP = NOT SYSOP
CURSOR.LINE = CSRLIN
CURSOR.ROW = POS(0)
LOCATE 25,1
PRINT SPACE$(79);
LOCATE 25,1
USER.SECURITY.LEVEL = (1 + SYSOP) * _
USER.SECURITY.SAVE - _
SYSOP * _
SYSOP.SECURITY.LEVEL
PRINT "Temp SYSOP Privileges "; MID$("OFFON",1-3*SYSOP,3);
CALL DELAYIT (3)
LOCATE CURSOR.LINE,CURSOR.ROW
SUBROUTINE.PARAMETER = 1
CALL LINE25
CALL CALLOPT
RETURN
'
' *****************************************************************************
' * F9 - COMMAND FROM LOCAL KEYBOARD (SNOOP TOGGLE) *
' *****************************************************************************
'
33130 IF NOT SNOOP THEN _
SNOOP = TRUE : _
LOCATE 24,1,0 : _
PRINT "SNOOP ON"; : _
SUBROUTINE.PARAMETER = 2 : _
CALL LINE25 _
ELSE LOCATE ,,0 : _
SNOOP = FALSE : _
CLS
33140 CHANGE.VALUE = SNOOP
FIELD.POSITION = 58
GOTO 33950
'
' *****************************************************************************
' * F10 - COMMAND FROM LOCAL KEYBOARD (FORCE CHAT WITH USER) *
' *****************************************************************************
'
33150 IF CHAT.AVAILABLE = TRUE THEN _
GOTO 33160
CURSOR.LINE = CSRLIN
CURSOR.ROW = POS(0)
LOCATE 25,1
PRINT SPACE$(79);
LOCATE 25,1
PRINT "CHAT not available now!";
CALL DELAYIT (1)
LOCATE CURSOR.LINE,CURSOR.ROW
SUBROUTINE.PARAMETER = 1
CALL LINE25
RETURN
33160 CALL UPDTCALR ("Sysop began chat",1)
CALL SKIPLINE (1)
CALL QTPUT ("Hi " + _
FIRST.NAME$ + _
", this is " + _
SYSOP.FIRST.NAME$ + _
" " + _
SYSOP.LAST.NAME$ + _
" Sorry to break in to CHAT but..",1)
FUNCTION.KEY = 0
GOTO 4770
'
' *****************************************************************************
' * PGUP DISPLAY USER PROFILE *
' *****************************************************************************
'
33200 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN
USER.DATA = TRUE
PRINT
PRINT "USER NAME: ";ACTIVE.USER.NAME$
PRINT "SECURITY :";STR$(USER.SECURITY.SAVE)
PRINT "PASSWORD :";PASSWORD.SAVE$
PRINT "READ MSG.:";STR$(LAST.MESSAGE.READ)
PRINT "TIMES ON :";STR$(TIMES.LOGGED.ON)
PRINT "LAST ON :";LAST.DATE.TIME.ON.SAVE$
PRINT "DOWNLOADS:";STR$(DOWNLOADS)
PRINT "UPLOADS :";STR$(UPLOADS)
PRINT "User's Profile"
GOSUB 5410
USER.DATA = FALSE
RETURN
'
' *****************************************************************************
' * UPDATE NODE RECORD WITH LOCAL FUNCTION KEY ACTIVITY *
' *****************************************************************************
'
33950 IF SNOOP THEN _
SUBROUTINE.PARAMETER = 1 : _
CALL LINE25
33960 IF CONFERENCE.MODE = FALSE THEN _
GOSUB 12986 : _
CALL OPENMSG : _
IF EC = 64 THEN _
EC = 0 : _
GOTO 5360 _
ELSE FIELD 1, 128 AS MESSAGE.RECORD$ : _
GET 1,NODE.RECORD.INDEX : _
MID$(MESSAGE.RECORD$,FIELD.POSITION,2) = STR$(CHANGE.VALUE) : _
CALL SAVEPROF (2) : _
FIELD 1, 128 AS MESSAGE.RECORD$ : _
RETURN
33970 PRINT "Cannot change status during Conference!"
RETURN
'
' *****************************************************************************
' * CALCULATE TIME REMAINING FOR USER *
' *****************************************************************************
'
41000 CALL TIMEREMAIN (TIME.REMAINING!)
IF BYPASS.TIME.CHECK THEN _
RETURN
IF TIME.REMAINING! < 0.1 THEN _
RETURN 10553
RETURN
'
' *****************************************************************************
' * SHOW USER CURRENT ACCESS LEVEL *
' *****************************************************************************
'
41070 A$ = "Granted access level" + _
STR$(USER.SECURITY.LEVEL) + _
MID$(" (SYSOP)",1,-8*(USER.SECURITY.LEVEL >= SYSOP.SECURITY.LEVEL))
GOSUB 12975
RETURN
'
' *****************************************************************************
' * NULLS SET FOR NEW USERS *
' *****************************************************************************
'
42700 A$ = "Want nulls (for printing terminal) (Y/N)"
GOSUB 12995
IF NO OR YES THEN _
NULLS = NO _
ELSE GOTO 42700
'
' *****************************************************************************
' * N - COMMAND FROM UTILITY MENU (NULLS TOGGLE) *
' *****************************************************************************
'
42710 NULLS = NOT NULLS
GOSUB 9520
42720 A$ = "Nulls " + MID$("OffOn",1-3*NULLS,3)
GOSUB 12979
RETURN
'
' *****************************************************************************
' * F - COMMAND FROM UTILITY MENU (FILE TRANSFER DEFALUT MODE) *
' * FILE TRANSFER DEFAULT SET FOR NEW USERS *
' *****************************************************************************
'
42800 A$ = "Default "
GOSUB 21600
USER.TRANSFER.DEFAULT$ = FT$
42810 A$ = "PROTOCOL: " + _
MID$("Ascii Xmodem Xm/CRC Kermit Ymodem Imodem YmodemGWxmodemNone",7*FF-6,7)
GOSUB 12979
RETURN
'
' *****************************************************************************
' * C - COMMAND FROM UTILITY MENU (CHANGE CASE TOGGLE) *
' * UPPER/LOWER CASE SET FOR NEW USERS *
' *****************************************************************************
'
42950 A$ = "CAN YOUR TERMINAL DISPLAY LOWER CASE (Y/N)"
GOSUB 12995
IF NO OR YES THEN _
UPPER.CASE = YES _
ELSE GOTO 42950
42960 UPPER.CASE = NOT UPPER.CASE
A$ = "UPPER CASE " + MID$("and lowerONLY",1-9*UPPER.CASE,9)
GOSUB 12979
RETURN
'
' *****************************************************************************
' * G - COMMAND FROM UTILITY MENU (GRAPHICS WANTED) *
' * GRAPHIC MENUS SELECTION SET FOR NEW USERS *
' *****************************************************************************
'
43000 IF NOT EIGHT.BIT THEN _
CALL QTPUT("Graphics unavailable",1):_
RETURN
43005 IF EXPERT.USER THEN _
GOTO 43007
43006 FILE.NAME$ = HELP$(9)
CALL BUFFILE (FILE.NAME$)
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
43007 A$ = "GRAPHICS wanted: N)one, A)scii-IBM, C)olor-IBM, H)elp"
GOSUB 12995
IF Q = 0 THEN _
GOTO 43007
CALL ALLCAPSD (B$(),1)
GR = INSTR("NAC",B$(1))
IF GR = 0 THEN _
GOTO 43006
USER.GRAPHIC.DEFAULT$ = MID$(" GC",GR,-(GR > 1))
GR = GR-1
43020 A$ = "GRAPHICS: " + MID$("None AsciiColor",GR*5 + 1,5)
GOSUB 12979
RETURN
43025 GOSUB 43030
'
' *****************************************************************************
' * DISPLAY NON-BREAKABLE TEXT FILES *
' *****************************************************************************
'
43027 STOP.INTERRUPTS = FALSE
CALL BUFFILE (FILE.NAME$)
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN 10595
STOP.INTERRUPTS = TRUE
RETURN
43030 CALL GRAPHIC (USER.GRAPHIC.DEFAULT$)
RETURN
'
' *****************************************************************************
' * MAKE INPUT STRING HIDDEN (USE *'S TO ECHO INPUT) *
' *****************************************************************************
'
45010 HIDDEN = TRUE
GOSUB 12995
HIDDEN = FALSE
GOSUB 12979
RETURN
'
' *****************************************************************************
' * XMODEM / CRC INTERFACE *
' *****************************************************************************
'
46000 XMODEM.CHECKSUM = 0
CRC.VALUE = 0
CALL XMODEM(WK$,XMODEM.CHECKSUM,CRC.VALUE,CRC.HIGH,CRC.LOW)
RETURN
'
' *****************************************************************************
' * DISPLAY MESSAGE & COMMENT EDIT PROMPT LINE *
' *****************************************************************************
'
50400 A$ = "A)bort, C)ontinue, D)elete, E)dit, I)nsert, L)ist, M)argin, S)ave"
GOSUB 12975
RETURN
'
' *****************************************************************************
' * UPDATE DOWNLOAD STATISTICS *
' *****************************************************************************
'
50600 IF DOWNLOAD.COMPLETED THEN _
CALL QTPUT ("Download successful",1):_
DOWNLOADS = DOWNLOADS + 1 : _
CALL MUSIC (6) : _
Y$ = " Downloaded " _
ELSE Y$ = " Aborted "
IF AUTODOWNLOAD.IN.PROGRESS THEN _
Y$ = " AUTO" + _
MID$(Y$,2)
IF INSTR(Y$,"Aborted") THEN _
AUTODOWNLOAD.IN.PROGRESS = 0
A$ = ""
50610 IF LOCAL.USER THEN _
RETURN
SUBROUTINE.PARAMETER = 2
CALL AMORPM
CALL BRKFNAME (FILE.NAME$,DR$,X$,EXTENTION$,TRUE)
Z$ = X$ + EXTENTION$ + Y$ + "at " + TIM$ + _
" using " + FT$ + STR$(BYTES.IN.FILE#)
CALL UPDTCALR (Z$,2)
RETURN
'
' *****************************************************************************
' * DIRECTORY SEARCH *
' *****************************************************************************
'
52900 CK = 2
IF Q > 1 THEN _
GOTO 52920
52910 A$ = "Search for string"
GOSUB 12998
IF Q = 0 THEN _
RETURN
B$(2) = B$(1)
52920 CALL ALLCAPSD (B$(),2)
RS$ = B$(2)
SEARCH.STRING$ = RS$
A1$ = B$(2)
GOTO 53007
'
' *****************************************************************************
' * N - COMMAND FROM FILES MENU (DISPLAY NEW FILES SINCE LAST DIR DISPLAY) *
' *****************************************************************************
'
53000 CK = 1
IF Q > 1 THEN _
GOTO 53005
53002 A1$ = RIGHT$(LM$,4) + LEFT$(LM$,2)
A$ = "Files on/after (MMDDYY, [ENTER] = last on " + A1$ + ")"
GOSUB 12995
IF Q = 0 THEN _
RS$ = LM$ : _
GOTO 53006
B$(2) = B$(1)
53005 IF LEN(B$(2)) <> 6 THEN _
GOTO 53002
A1$ = B$(2)
RS$ = RIGHT$(A1$,2) + LEFT$(A1$,4)
53006 SEARCH.DATE$ = RS$
SEARCH.STRING$ = ""
53007 IF Q > 2 THEN _
DIR.INDEX = 3 : _
GOTO 53030
53010 CALL GETDIRS ("quits")
IF Q = 0 THEN _
RETURN
DIR.INDEX = 1
53030 CALL CONVDIRS (DIR.INDEX)
LAST.DIR.POS = Q
LIST.DIRECTORY = TRUE
LIST.NEW = TRUE
53035 Z$ = B$(DIR.INDEX)
IF Z$ = "ALL" THEN _
IF NOT LIMIT.SEARCH.TO.FMS THEN _
GOTO 53070
53060 LIST.INDEX = DIR.INDEX
QX = LIST.INDEX
GOSUB 20161
DIR.INDEX = DIR.INDEX + 1
IF DIR.INDEX <= LAST.DIR.POS THEN _
GOTO 53035
LIST.NEW = FALSE
SEARCH.STRING$ = ""
SEARCH.DATE$ = ""
RETURN
53070 G = DIR.INDEX
J = DIR.INDEX
B$(DIR.INDEX) = DIRECTORY.PATH$ + _
"*." + _
DIRECTORY.EXTENTION$
GOSUB 53100
CLS
SUBROUTINE.PARAMETER = 1
CALL LINE25
QX = G
LIST.INDEX = DIR.INDEX+1
GOSUB 20161
LIST.NEW = FALSE
REDIM B$(ADIM)
RETURN
53100 CLS
53101 FILES B$(J)
X = CSRLIN
LOCATE 2,1,1
MAIN.DIRECTORY$ = DIRECTORY.EXTENTION$
FOR I = 2 TO X
FOR B = 1 TO 66 STEP 18
G = G + 1
B$(G) = ""
FOR QQ = 0 TO 7
H = SCREEN (I,(B + QQ))
B$(G) = B$(G) + CHR$(H)
NEXT
IF LEFT$(B$(G),1) = " " THEN _
G = G-1 : _
RETURN
WHILE RIGHT$(B$(G),1) = " "
B$(G) = LEFT$(B$(G),LEN(B$(G))-1)
WEND
53105 IF LIST.NEW THEN _
IF (OMIT.MAIN.DIRECTORY$ = "YES" AND _
(B$(G) = MAIN.DIRECTORY$ OR _
B$(G) = MAIN.DIRECTORY$ + "G" OR _
B$(G) = MAIN.DIRECTORY$ + "C")) OR _
(USER.SECURITY.LEVEL < MIN.SEC.TO.VIEW AND _
(B$(G) = UPLOAD.DIR.CHECK$ OR _
B$(G) = UPLOAD.DIR.CHECK$ + "G" OR _
B$(G) = UPLOAD.DIR.CHECKS$ + "C")) THEN _
G = G-1 : _
GOTO 53110
53110 NEXT
NEXT
RETURN
'
' *****************************************************************************
' * DISPLAY CALLERS FILE *
' *****************************************************************************
'
57000 CALL SKIPLINE (1)
CALLERS.FILE.INDEX.TEMP = CALLERS.FILE.INDEX
CLOSE 4
OPEN "R",4,CALLERS.FILE$,64
FIELD 4,64 AS CALLERS.RECORD$
57005 IF CALLERS.FILE.INDEX.TEMP < 1 OR _
RET THEN _
RETURN
57010 GET 4,CALLERS.FILE.INDEX.TEMP
A$ = CALLERS.RECORD$
IF LEFT$(A$,3) = SPACE$(3) OR _
INSTR(A$,"on at") = 0 THEN _
GOTO 57030
57025 CALLERS.FILE.INDEX.TEMP = CALLERS.FILE.INDEX.TEMP - 1
GET 4,CALLERS.FILE.INDEX.TEMP
Z = INSTR(CALLERS.RECORD$,"{")
IF Z < 1 OR Z > 15 THEN _
Z = 15
IF SYSOP OR _
LEFT$(A1$,3) <> " " THEN _
A$ = A$ + LEFT$(CALLERS.RECORD$,Z-1)
GOSUB 57100
IF SYSOP THEN _
A$ = MID$(CALLERS.RECORD$,Z) : _
GOSUB 57100
GOTO 57045
57030 IF SYSOP THEN _
GOSUB 57100
57045 CALLERS.FILE.INDEX.TEMP = CALLERS.FILE.INDEX.TEMP -1
GOTO 57005
57100 CALL QTPUT (A$,1)
57110 IF LINES.PRINTED >= PAGE.LENGTH THEN _
IF NON.STOP THEN _
LINES.PRINTED = 0 : _
CALL CARRIER : _
IF SUBROUTINE.PARAMETER THEN _
RETURN 10595 _
ELSE _
RETURN _
ELSE _
GOSUB 5600 : _
IF NO THEN _
RETURN 57120
57120 RETURN
'
' *****************************************************************************
' * TEST FOR FUNCTION KEY PRESSED *
' *****************************************************************************
'
60000 CALL FINDFUNC
60010 IF LEN(KEY.PRESSED$) <> 2 THEN _
RETURN
ON FUNCTION.KEY GOSUB 31000, _ ' F1
32000, _ ' F2
33000, _ ' F3
33040, _ ' F4
33060, _ ' F5
33070, _ ' F6
33090, _ ' F7
33110, _ ' F8
33130, _ ' F9
33150, _ ' F10
1398, _ ' END KEY
33200 ' PGUP
KEY.PRESSED$ = ""
RETURN
'
' *****************************************************************************
' * REPLY TO MESSAGE SAVE ORIGINAL ATTRIBUTES *
' *****************************************************************************
'
62520 SQ = Q
LG$(10) = B$
LINES.IN.MESSAGE.SAVE = LINES.IN.MESSAGE
SL = S
NON.STOP.SAVE = NON.STOP
MESSAGE.DIM.INDEX.SAVE = MESSAGE.DIM.INDEX
RETURN
'
' *****************************************************************************
' * REPLY TO MESSAGE RESTORE ORIGINAL ATTRIBUTES *
' *****************************************************************************
'
62530 Q = SQ
B$ = LG$(10)
LINES.IN.MESSAGE = LINES.IN.MESSAGE.SAVE
S = SL
NON.STOP = NON.STOP.SAVE
MESSAGE.DIM.INDEX = MESSAGE.DIM.INDEX.SAVE
KILL.MESSAGE = FALSE
RETURN
'
' *****************************************************************************
' * TEST FOR EXIT TO DOS *
' *****************************************************************************
'
63000 OLD.DAT$ = MID$(MESSAGE.RECORD$,76,10)
OLD.TIME = VAL(MID$(MESSAGE.RECORD$,86,5))
NEW.TIME = VAL(LEFT$(TIME$,2)) * 100 + VAL(MID$(TIME$,4,2))
IF OLD.DAT$ = DATE$ THEN _
RETURN
IF NEW.TIME < OLD.TIME THEN _
RETURN
MID$(MESSAGE.RECORD$,76,10) = DATE$
MID$(MESSAGE.RECORD$,86,5) = STR$(TIME.TO.DROP.TO.DOS)
SHELL "RBBSTIME"
RETURN